I am using Excel 2007 with VB6.5 programming a small macro to communicate with devices through 2 Com ports. COM1: PC build-in RS232.
I have been tasked to copy excel workbook from windows xp machine running office 2003 to a windows 7 machine running office 2010. The workbook gets data from a serial port or winsock port. When opening the workbook after enabling the security dialog the VBA gets so locked up with missing libraries that you can't stop the VBA from running (compile error: method or data member not found). I can open the workbook on my machine because I have VB6 installed. I would like to be able to stop the program from running and try to fix the references. On this same machine I opened a new excel spreadsheet, added macro, edited macro to get to underlying VBA. I then added a userform and tried adding the mscomm and winsock controls but these items don't appear in the list anymore.
![Excel Excel](http://www.idautomation.com/font-encoders/libreoffice/img/libreoffice-basic-macros.png)
Is there a new way to do this or did we lose features going from 2003 to 2010? So far I have found this answer 'The error value 0x8002801c means, Error accessing the OLE (Object Linking and Embedding) registry.
You need to copy the MSCOMCT2.OCX file to c: windows sysWOW64 not c: windows system32. Run the command with elevated privileges, to do this, follow the steps below: i. Click on start and in the start search bar type CMD, right click on the command prompt icon in the programs area and then click on run as administrator. At the command prompt type regsvr32 wmnetmgr.dll and then press enter. ' I have the items registered and added to the references in the VBA but now I get a new feature from Microsoft 'the control could not be created because it is not properly licensed' when adding the control back to the form in VBA. So far I have found this answer 'The error value 0x8002801c means, Error accessing the OLE (Object Linking and Embedding) registry. You need to copy the MSCOMCT2.OCX file to c: windows sysWOW64 not c: windows system32.
![Mscomm32 Mscomm32](/uploads/1/2/4/0/124087799/519369357.jpg)
Run the command with elevated privileges, to do this, follow the steps below: i. Click on start and in the start search bar type CMD, right click on the command prompt icon in the programs area and then click on run as administrator. At the command prompt type regsvr32 wmnetmgr.dll and then press enter. ' I have the items registered and added to the references in the VBA but now I get a new feature from Microsoft 'the control could not be created because it is not properly licensed' when adding the control back to the form in VBA. FordIT Sorry.In the section above I followed the steps for registering, but I did it for the MSComm32.ocx and the MSWinsck.ocx actvieX controls. I still haven't found anyway to fix the problem so now I am working on a solution to have.NET program be responsible for collecting the data via Network or Serial Stream and putting the data in a Microsoft Message Queue (MSMQ). I will then have the Excel program get the data out of the MSMQ and process.
I really wish Microsoft would fix the items that they break, so I wouldn't have to do this. My biggest fear is that next go around Microsoft will break MSMQ then I will really be in trouble. I would use one of my MSDN support calls but they only give you two and I already wasted one on an answer that didn't fix a problem.