FAQ - Ole automation
I try to use CODE in VisualBasic but I get the error message 'ActiveX can't create the object'?
First check if the name of the OLE automation server in the VisualBasic command is correct. The server name of CODE is 'code.colors'. If this does not solve the problem, the registration of the OLE automation server is probably incorrect for some reason. When you run the setup program, CODE is registered as OLE automation server automatically. If this action failed, a call of the server in VisualBasic does not work. In this case you can do the registration manually. Start a Windows command line by clicking on the Windows key on your keyboard followed by the letter 'r' (for run). You must have administrator rights to do registrations. If you are logged-in as a normal user, you can right-click the command line in 'Start/accessories' and select the option 'Run as administrator'. Once the command line is available, type in the command "c:\program files\code.exe" /regserver where you should make sure that you use the double quotes as shown. The path of the program file code.exe must be adapted to your system, of course, i.e. it should point to the location of your code program. If you work with different CODE versions on one computer, you might want to use the command "c:\another_installation_folder\code.exe" /unregserver in order to explicitly de-register a code program as OLE server.