{"action":"opened","issue":{"url":"https://api.github.com/repos/VBA-tools/VBA-Dictionary/issues/11","labels_url":"https://api.github.com/repos/VBA-tools/VBA-Dictionary/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/VBA-tools/VBA-Dictionary/issues/11/comments","events_url":"https://api.github.com/repos/VBA-tools/VBA-Dictionary/issues/11/events","html_url":"https://github.com/VBA-tools/VBA-Dictionary/issues/11","id":70905493,"number":11,"title":"Compilation problem?","user":{"login":"JNurick","id":12034501,"avatar_url":"https://avatars.githubusercontent.com/u/12034501?v=3","gravatar_id":"","url":"https://api.github.com/users/JNurick","html_url":"https://github.com/JNurick","followers_url":"https://api.github.com/users/JNurick/followers","following_url":"https://api.github.com/users/JNurick/following{/other_user}","gists_url":"https://api.github.com/users/JNurick/gists{/gist_id}","starred_url":"https://api.github.com/users/JNurick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JNurick/subscriptions","organizations_url":"https://api.github.com/users/JNurick/orgs","repos_url":"https://api.github.com/users/JNurick/repos","events_url":"https://api.github.com/users/JNurick/events{/privacy}","received_events_url":"https://api.github.com/users/JNurick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-25T12:49:45Z","updated_at":"2015-04-25T12:49:45Z","closed_at":null,"body":"Hi Tim,\r\nI've just downloaded the latest VBA-Dictionary-master.zip.\r\n1) When I open VBA-Dictionary Specs.xlsm and click on Run Specs, I get Error 5 on this line\r\n\r\n        dict_pDictionary.CompareMode = Value\r\n\r\nin `Public Property Let CompareMode`. Here's the call stack:\r\n\r\n![call stack](https://cloud.githubusercontent.com/assets/12034501/7332851/c418db6e-eb4d-11e4-9e77-9a5a0e66bf5b.png)\r\n\r\nAt this point `dict_pDictionary.Count` is 1. \r\n\r\nSo I tried stepping through the code and found something that seems strange. In `AllSpecs()`, at the first call to `CreateDirectionary(UseNative)`, with `UseNative=False`: \r\n\r\n    Public Function CreateDictionary(Optional UseNative As Boolean = False) As Object\r\n        If UseNative Then\r\n            Set CreateDictionary = CreateObject(\"Scripting.Dictionary\")\r\n        Else\r\n            Set CreateDictionary = New Dictionary\r\n        End If\r\n    End Function\r\n\r\n2) If `UseNative` is true, this returns a Scripting.Dictionary. If `UseNative` is False, it returns a new (VBA-)Dictionary. But the compiler constant `UseScriptingDictionaryIfAvailable` is True, which means that (in Windows) VBA-Dictionary uses a Scripting.Dictionary - IOW, it appears, your test code doesn't test the class. \r\n\r\nTo overcome this I set `UseScriptingDictionaryIfAvailable=False`. This leads to compile errors, starting with an undeclared variable `Key` in `dict_AddKeyValue()`.\r\n\r\nWindows 7, Excel 2010\r\n\r\nOver to you!\r\n\r\nJohn\r\n\r\n"}}