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

Installation instructions #5

Closed
jcushman opened this issue Mar 3, 2015 · 2 comments
Closed

Installation instructions #5

jcushman opened this issue Mar 3, 2015 · 2 comments

Comments

@jcushman
Copy link

jcushman commented Mar 3, 2015

I'm having a little trouble installing this in a fresh document. Here's what I tried:

(1) In Excel 2011 for Mac, if I right-click on "Class Modules", choose "Import File ...", and select Dictionary.cls, I get this error:

"The form class contained in '[my path]:Dictionary.cls' is not supported in VBA. The file can't be loaded."

(2) If I create a new Class Module, name it Dictionary, and paste the contents of Dictionary.cls in, then the class sort of works, but assignment is broken:

Dim test As New Dictionary
' this works:
test.Add "Bar", "Baz"
' this doesn't work:
test("Key") = "Foo"
'=> Run-time error '438': Object doesn't support this property or method

(3) If I open an existing project that already has this installed (like VBA-Web - blank.xslm), the code above does work. So I know that Excel 2011 is compatible -- I must just be doing something wrong during the install.

Many thanks -- VBA-tools looks like some great work, and super helpful if I can just get it working. :)

Thanks,
Jack

@timhall
Copy link
Member

timhall commented Mar 4, 2015

Hi @jcushman I had some similar problems in the past, but not this one in particular. I'll look into this further.

@timhall
Copy link
Member

timhall commented Mar 4, 2015

This turns out to be a line-ending issue. It appears Excel Mac requires Windows line-endings (CRLF) when importing modules and classes and saving Raw content from GitHub uses just a LF, causing this issue.

Solution: Download the full source code zip, https://github.com/VBA-tools/VBA-Dictionary/releases. I've set up the repo to always include CRLF for files, so cloning the repo or downloading the full source avoids these issues.

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