Register OCX-components by means of VBA-code?

J

Jay Freedman

If possible, please an example!

/BosseH

Hi Bo,

Use the Shell command to launch regsvr32.exe (which is in the
C:\WINDOWS\system32 folder), with the ocx's path and filename as a
parameter.

If there are no spaces in the path, something like this will work:

Shell "regsvr32 c:\windows\system32\asctrls.ocx"

If there are spaces, you need to include quotes around the
path/filename as part of the parameter. To do this, represent the
quotes as Chr$(34) like this:

Shell "regsvr32 " & Chr$(34) & _
"c:\program files\quicktime\qtplugin.ocx" _
& Chr$(34)
 

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

Top