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

2007-09-19 10:51:41 PM
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:
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 run 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 help!