In vb 6.0 how a declaration to a custom object is error

Dim objCurrency as New Currency

Error: Compile error
Expected Identifier

Any suggestions?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

This is because Currency itself is a reserved datatype for currency values.
Guy Hengel [angelIII / a3]Billing EngineerCommented:
this could be due to the library (dll) providing the Currency class not being properly added in the project references
please check the project references; and if you can browse (F2) the class library
You can change the class name to another one.
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Leo EikelmanDirector, IT and Business DevelopmentCommented:
Try using late binding

Dim objCurrency as Object

Set objCurrency = CreateObject("Currency")

If this doesn't work then make sure the dll is registered using regsvr32 "path to the DLL file"

Also check your registery if the dll is registered

Start reg edit ("Start->Run-> type regedit) and navigate to HKEY_CLASSES_ROOT\

Check in that list that your DLL component is registered and that the name of the component is the same as you expect.

Hope that helps,


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
swansonplaceAuthor Commented:
Thank you all very much for your assistance!
Leo EikelmanDirector, IT and Business DevelopmentCommented:
thank you  :)

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.