VB.NET library for Excel
-
I have Excel 2007 installed on both my Windows 7 and Windows 8.1 computers. On Windows 7, a class library built with VS 2010, com visible, and registered for com works as expected. The class has the required interface to work with com. However, I copied the complete library project to the Windows 8.1 computer, and built the library with VS 2013. The library is properly registered and com visible and shows in the Excel VBA project as a reference. All the functionality is displayed through Excel's Object Explorer. But the VBA code fails with the line to set the object to to a new instance of the class. The error message given is that "class does not support automation or does not support expected interface". I have no idea how to fix the problem. I have tried everything I know to do without success. Here is the code snippet where the problem occurs. 1 Dim myPipe As TwoPhaseFlowCom next line fails 2 Set myPipe = New TwoPhaseFlowCom 3 Call myPipe.NewFlow(WV, DV, VV, WL, Dl, LV, STEN, D) I tried to register the dll built with VS 2010 on the Windows 7 machine on the Windows 8.1 machine. But all attempts to register failed. Any suggestions on how to remedy the problem is appreciated. Bobby
-
I have Excel 2007 installed on both my Windows 7 and Windows 8.1 computers. On Windows 7, a class library built with VS 2010, com visible, and registered for com works as expected. The class has the required interface to work with com. However, I copied the complete library project to the Windows 8.1 computer, and built the library with VS 2013. The library is properly registered and com visible and shows in the Excel VBA project as a reference. All the functionality is displayed through Excel's Object Explorer. But the VBA code fails with the line to set the object to to a new instance of the class. The error message given is that "class does not support automation or does not support expected interface". I have no idea how to fix the problem. I have tried everything I know to do without success. Here is the code snippet where the problem occurs. 1 Dim myPipe As TwoPhaseFlowCom next line fails 2 Set myPipe = New TwoPhaseFlowCom 3 Call myPipe.NewFlow(WV, DV, VV, WL, Dl, LV, STEN, D) I tried to register the dll built with VS 2010 on the Windows 7 machine on the Windows 8.1 machine. But all attempts to register failed. Any suggestions on how to remedy the problem is appreciated. Bobby
Are there any run-time dependencies you might have missed? Try downloading the SysInternals Suite[^] from MS TechNet - it's free and incredibly useful for tracking down problems like this. Have a look at the Process Explorer and Process Monitor parts of the suite - doesn't take long to get up and running.