I get stuck with the highlighted line and get "Run Time error 438" when I run the following code.
Please help....
Sub beamppt()
Dim pdWidth As Double
Dim pdDepth As Double
Dim pdlength As Double
Dim SelBeamsNo As Long
Dim Beam As Long
Set objOpenSTAAD = GetObject(, "StaadPro.OpenSTAAD")
SelBeamsNo = Cells(4, 1) (This cell has the total no of beams)
For i = 1 To SelBeamsNo
Beam = Cells(3 + i, 2) (This cell has the beam numbers)
objOpenSTAAD.GetMemberWidthAndDepth Beam, pdWidth, pdDepth
Cells(3 + i, 3) = pdWidth
Cells(3 + i, 4) = pdDepth
Next i
End Sub