Page 1 of 1

Cannot run macro - error on instantiating PCAN3.PCANClient

Posted: Wed 19. Dec 2018, 21:16
by togs-bng
When I attempt to run a macro now, I often encounter an error similar to the following:
Macro Error on instantiating PCAN3.PCANClient object
Macro Error on instantiating PCAN3.PCANClient object
pcan-macro-error.gif (5.96 KiB) Viewed 5486 times
This started happening after I set up PCAN Explorer 5 on my new Windows 10 machine. It was never an issue when I was running Windows 7. I'm not sure if that's a factor, but thought I'd mention it.

I've isolated the error to the inclusion of the CreateObject() call that instantiates the object:

Code: Select all

  Dim MyClient
  Set MyClient = CreateObject("PCAN3.PCANClient")
The error isn't very descriptive so I'm not sure why it's tripping on this.

In VB (but not VBA), I could instantiate the object using early binding (e.g. Dim MyClient As New PCAN3.PCANClient) but this does not work in VBA, both of which I'm quite rusty at!

Any insights would be greatly appreciated!

Re: Cannot run macro - error on instantiating PCAN3.PCANClie

Posted: Thu 20. Dec 2018, 09:58
by M.Maidhof
Hi,

which PCAN-Explorer 5 version do you use?

best regards

Michael

Re: Cannot run macro - error on instantiating PCAN3.PCANClie

Posted: Sat 22. Dec 2018, 00:17
by togs-bng
Thanks for the response!

I was running PCAN Explorer 5.3.2.808, but as soon as you asked me the question, I downloaded/installed 5.4.2.902. I haven't rebooted my Win10 machine yet, but simply installing 5.4.2.902 has allowed me to run my old macros without problem now, including the CreateObject("PCAN3.PCANClient") call.

Odd, since I didn't need to upgrade PCAN Explorer on my Win7 machine. But, problem solved!

Re: Cannot run macro - error on instantiating PCAN3.PCANClie

Posted: Sat 22. Dec 2018, 13:45
by PEAK-Support
Thank you for that feedback - looks like a lack of authorization with the older Explorer and the latest Windows 10 Uptades.