How to force a VBA code to use one particular version of a registered COM object?

J

Jojo

I have a COMobject called MyCOM.exe. This COM object will be used
just
as a regular application also. I often release mulitple versions of
this application to a client and they put the releases on a network
drive like the following:

M:\folderA\MyCOM.exe
M:\folderB\MyCOM.exe


There are two teams in the client company. One team will use it as a
regular application and another team will call it in a VBA script.


I have noticed that the VBA code seems always reference to the newly
registered COM object. So if a user ran folderA\MyCOM.exe then the
VBA
code will use folderA\MyCOM.exe. How can I force the VBA code always
use the folderB\MyCOM.exe?

Thanks for your help!
 
K

Karl E. Peterson

Jojo said:
I have noticed that the VBA code seems always reference to the newly
registered COM object. So if a user ran folderA\MyCOM.exe then the VBA
code will use folderA\MyCOM.exe. How can I force the VBA code always
use the folderB\MyCOM.exe?

Break compatability, recompile, and re-reference. That's how COM works.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top