Late binding question

Currently, I have a VB6 ActiveX EXE which is located on a server. I have numerous progams that use this ActiveX EXE. I have used early binding in all these programs.
Whenever a change is made to the ActiveX EXE which breaks compatibility, I have to unregister than Re register the ActiveX EXE in all the projects. This happens a couple of times a year.
It is my understanding that with late binding this would not be necessary. Is this correct?
I tried to experiment with the late binding but was not able to create the object.

Dim objWP as Object

objWP = CreateObject("WPExe.exe","\\FileServer\Code")

This code failed.
I also tried
objWP = CreateObject("WPProject.Class1","\\FileServer\Code")
This also failed. I have never installed or registered the ActiveX EXE on the server(FileServer).

What would be the correct way to accomplish this.
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.

Yes that is correct.
When you use early binding you can enjoy the text assist when coding.

To get the best of both worlds keep it bound while in development mode then when ready to compile a release uncheck the reference.

The way that I took care of updating multiple systems in the field was to create a standalone exe that would just start and check the update folder on the server to see if there are any updates.  If there were they would be copied down.  You can also run RegSvr to register any OCXs' or DLLs'.  After everything is updating the updater program would end and start the normal program exe.  The reason that end user shortcut starts the updater and not the normal exe is that you can't update the exe if it is running.

mpdillonAuthor Commented:
Thanks for confirming my belief that late binding would solve the registration prolem. However, I cannot get the ActiveX exe on th e Server to register on the server. Also I cannot get the Create Object code to run without error. Any insights on these two points?
If the EXE is running on the remote machine (and it has been set up to allow remote access) you only need to pass the machine name as the second argument.

The following snippet is taken from ''. If you search there for 'CreateObject' you will find more details.

Sub CreateRemoteExcelObj()
   Dim xlApp As Object
   ' Replace string "\\MyServer" with name of the remote computer.
   xlApp = CreateObject("Excel.Application", "\\MyServer")
End Sub

Hope this helps.

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

mpdillonAuthor Commented:
Sorry for the long delay in my response. I believe you are on the right track. Here is my code.
Dim objWP as object
objWP = CreateObject("WPProjectX.Class1,"\\MyServerName")

At this point I receive a "Run Time Error 91.  Object variable or With Block not set ."

I am trying to running this ActiveX exe application(WPProjectX) on a workstation. However, the actual exe(WPProject.exe) resides on MyServer. I looked in the registry on the server and found the following keys(?)
Implemented Categories

In the ProgID key was the default value "WPProjectX.Class1"

This ActiveX exe does not continuously run in the background. Rather, every time it is called by a workstation, a new instance is created on the workstation and then destroyed when the calling app closes.
This has worked fine for some time when I use early binding. But I would like to use late binding. This will make changes to the exe easier to implement and expand my knowledge of how VB works.
thanks again for any addtional help you might provide.
Set objWP = CreateObject("WPProjectX.Class1,"\\MyServerName")
mpdillonAuthor Commented:
Thanks for your reply. I made the change by adding SET to my code. However, it still does not function. But I did get a new error message. That message is:

The remote server machine does not exist or is unavailable.

Any thoughts?
Do you ReRegister by using RegSvr.exe (for 16 bit ocx, dll, etc) and RegSvr32.exe (for 32 bit ocx, dll, etc)?

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
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
Microsoft Development

From novice to tech pro — start learning today.