Hi everyone,
I have a problem as below:
I used Microsoft Visual Basic 2010 to make Macro and I used the following to get the end-force:
objOpenSTAAD2 = CreateObject("OpenSTAAD.Output.1")When programming I put the reference to file: “Interop.OPENSTAADLib.dll”
The Macro run well for some computers but for some computers specially for Windows 7 there is a massage that:
“Can’t not create activeX component”
Please support us to solve this problem.
Regards,
Thai
The method explained in your reply works perfect in VBA. However, by looking at the snapshot provided by Thai, the CreateObject call is made from VB.Net (within Visual Studio). I am also trying to get OpenSTAAD object using VB.Net (Not VBA) but I am encountering the exact exception. Please refer to the snapshot below.
Your help in resolving this issue is highly appreciated. I tried searching in the internet about this issue and especially in relation to OpenSTAAD but sad to say I ended up with a very limited (rather nil) information.
Hi, Are you using Win10 system? I came into same problem in win10, But in win7 it works well.
"The component failed to retrieve the CLSID of {1797F52C - c5e2-4f1-b524-f5a107ea6453} in the COM class factory"
I referenced the "C:\SProV8i SS5\OpenSTAAD\OpenSTAADUI.tlb" but, I can use it in win10. I allways go to error when it goes
Dim staad As New OpenSTAAD
Hi,
I have been facing this issue as well (please look at my reply to Mr. Carlos Aguera) and I have been trying to figure out the solution for quite some time now. Surprisingly, I can now instantiate the OpenSTAAD object from within Visual Studio. However, if you are running the debug mode, chances are that, you'll repeatedly get this exception. Instead, publish the AddIn and try to check if it works.
Further if you are assigning the workbook name (or) worksheet name to a variable, make sure that the name of the workbook under consideration is assigned before step in to the code. Most cases, if the workbook is not active, then a null will be assigned to the wb variable.
'VB Comment: Suggestion by Trial and Error NOT by expertise