Is there a way to remove an ocx from the project|components tab? I have three called project1 from different tutorials. I would like to redo one of them with a different name and just dump the other two.
Printable View
Is there a way to remove an ocx from the project|components tab? I have three called project1 from different tutorials. I would like to redo one of them with a different name and just dump the other two.
Click on "Start" button
Click on "Run"
Type this in the command line:
Regsvr32.exe /v /u "C:\Your Program Name.ocx"
FYI...
/v = version
/u = uninstall
After you do this, you can delete the ocx because it has been unregistered.
I browsed for the .ocx file, then I typed in Regsvr32.exe /v/u before it. I got a message box saying something was sucessful. I then went to the folder and removed all the other files I could find that were associated with the ocx. When I went to Project|Components, it was still there. Do I need to do something else. I get an error trying to load the ocx, saying it can't be found or something, but it's still on the list.
I had a similar problem like this when I first started using OCX years ago.
Tell me if I am wrong!
You register the OCX by either double clicking on it or ran the Active X through VB. This is automatic registration of OCX.
Then you decide to delete the entire project including the OCX.
If you deleted the ocx before unregistering it will still remain in the Component Box like this.
Is this what you did?
Even if you copy the ocx back again, it will not unregister because it becomes a different version.
You have one of two choices:
I don't think this will work, but give it a tried.
Regsvr32.exe /u "C:\whatever.ocx"
or
This will definitely work.
Search for a file on the internet call RegClean.exe
This will clean your registry out. Read all the warnings on this before you run it. I use it many times in the past.
I have regclean, what do I do? Do I delete all the files associated with the ocx then run it?
I have a novel idea, why don't I try it before I ask. I did, it worked. Thanks for the help.
Keep in mind in the future when you are dealing with Active X controls, you must simply unregister it(regsvr32.exe /u /v "Your OCX file"), then you can delete it. If you delete it first, then I recommend the Regclean.