ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VB to register an Active - X control (https://www.excelbanter.com/excel-programming/287606-vbulletin-register-active-x-control.html)

Kelly[_7_]

VB to register an Active - X control
 
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

Ken Macksey

VB to register an Active - X control
 
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



Kelly[_7_]

VB to register an Active - X control
 

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


All times are GMT +1. The time now is 04:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com