PDA

View Full Version : Register / De-register OCX Files Using VBA



Rasm
04-05-2011, 09:34 PM
This forum allows you to upload files directly - so I have decided to share some of the little tools I use here and there. The XLSM file here is to register OCX files - you may simply do this from the old DOS prompt. But I always forget how to do that. So I use this tool. I found it on the net - made very few changes and voila - it worked.

I have recently switched to Windows 7 - so you will see that my OCX files reside in c:\Windows\SysWOW64 - however I have remmed out the older system - so just change code to fit the path your need.

I hope others will upload these small routines - they sure help when you like me is just trying to learn

Excel Fox
04-05-2011, 10:23 PM
Rasm, thanks for another helpful piece of code :thumbsup:

imranbhatti
12-12-2020, 10:55 PM
An older post, but I believe Mr Rasm will still be able to guide further.

I have a folder of .ocx file right inside the directory where my Excel(.xlsm) file exists. I am using widdows 10 64-bit and also Excel 2019 64-bit
On open event of my Excel file I want to check if the OCX file already registered? and if not register it.

Can you please guide me how can I achieve this? as my ocx file is not stored at the directory where it will be registered.

I hope this makes sense.

Best Regards
Imran Bhatti