VB to register an Active - X control

K

Kelly

Hi Group.

I am looking for some help creating some code that will
register a specfic active-x control.

Assuming that a hundred employee's each have a new
calendar control (axtive - x) saved to a specific file
loczation.

I want to have an excell template run some code to
register the control when it is opened so that the control
will be availible for use on that form.


If possible the code will first check to see if it is
already registered and then only if itr is not it will
register the conrol . This way every time the user opens
the control it won't re-register the control.

Ideas anyone, Thanks

Kelly
 
K

Ken Macksey

Hi

Assuming it is mscal.ocx, Then copy it to the windows\system or
windows\system32 dir as required.

FileCopy "mscal.ocx", "C:\windows\system"
FileCopy "mscal.ocx", "C:\windows\system32"

then use shell to register it.

Shell ("regsvr32.exe mscal.ocx")

HTH

Ken M
 
K

Kelly

-----Original Message-----
Hi

Assuming it is mscal.ocx, Then copy it to the windows\system or
windows\system32 dir as required.

FileCopy "mscal.ocx", "C:\windows\system"
FileCopy "mscal.ocx", "C:\windows\system32"

then use shell to register it.

Shell ("regsvr32.exe mscal.ocx")

HTH

Ken M


.Thanks for the reply Ken but I'm afraid I'm not sure
what you mean. First I should clarify that my question was
asking for help using vb code to register the control. You
are right it is mscal.ocx but I need to install and
register it in over 100 PC's.

I have figured out how I can place this control in a
specific folder in each PC with the use of an auto-sync
routine but now I want to be able to add some code to a
template so that when any of the users try to open the
template the code will register the control.

Sorry I am unfamiliar with "shell"

Kelly
 

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

Similar Threads


Top