Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax Error in property Get Count() #31

Open
1ericsanchez opened this issue Mar 19, 2021 · 1 comment
Open

Syntax Error in property Get Count() #31

1ericsanchez opened this issue Mar 19, 2021 · 1 comment

Comments

@1ericsanchez
Copy link

1ericsanchez commented Mar 19, 2021

Hi, thanks for making this dictionary replacement for VBA. I'm having trouble getting it to work though. Currently I'm getting a syntax error when I try to define a dictionary. No error codes with the syntax error, but it points me to the following lines with the second line (Attribute Count.VB... ) highlighted:

Public Property Get Count() As Long
Attribute Count.VB_Description = "Get the number of items in the dictionary.\n"
#If Mac Or Not UseScriptingDictionaryIfAvailable Then
    Count = dict_pKeyValues.Count
#Else
    Count = dict_pDictionary.Count
#End If
End Property

Is this a known issue or do you have any suggestions on tracing back the issue?
I'm using Excel 2016 for mac, OSX 10.15.7

Thanks!

Edit: code block formatting

@pietermj
Copy link

Hi, that seems to be an artefact from (mis-)importing the module. When importing, the Attribute (propertyname).VB_Description directive is used to assign a description to the count property, which then could be viewed in the object browser in the VBA IDE.
Simply delete it or comment it to debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants