Hi,
I am trying to get started with openSTAAD.I have tried in excel and the built in editor in STAAD.I get an error when trying to instantiate the open staad library. I have Staad open to a new file.
I have tried the flowing code in VBA for Excel
Sub Main()
Set objOpenStaad = GetObject(,"StaadPro.OpenSTAAD")
End Sub
and get the following error:
Runtime error '429':
"ActiveX component can't create object"
in Staad, i have the following (default) code:
Option Explicit
Sub Main
Dim objOpenStaad As Object
Dim stdFile As String
Set objOpenStaad = GetObject(,"StaadPro.OpenSTAAD")
objOpenStaad.GetSTAADFile stdFile, "TRUE"
If stdFile="" Then
MsgBox"Bad"
Set objOpenStaad = Nothing
Exit Sub
End If
MsgBox"Macro Ending"
Set objOpenStaad = Nothing
End Sub
I get the following error:
(10096) ActiveX Automation: no object currently active.
Any ideas why I cant get openSTAAD to work?