Query about openstaad properties function

Hello ppl,

 I am trying to get beam geomerical properties (specifically width and depth) through Openstaad feature (specifically GetBeamProperty) and so far failing.

When i run the corresponding VBA code i get result as either "TRUE" or "1" or not at all. Please check out the VBA code and see what needs to be rectified ?

Any help would be deeply appreciated.

Sub bea_len()

 With Sheets("Tabulation")

 

 Dim objOpenSTAAD As Object

 Dim BeamNo As Long

Dim Width, Depth, Ax, Ay, Az, Ix, Iy, Iz, pro(0 To 7) As Double

'Get the application object --

 Set objOpenSTAAD = GetObject(, "StaadPro.OpenSTAAD")

 BeamNo = 44

     'Get geometrical properties of  Beam

 For i = 0 To 7

  pro(i) = objOpenSTAAD.Property.GetBeamProperty(BeamNo, Width, Depth, Ax, Ay, Az, Ix, Iy, Iz)

  Cells(i + 4, "C").Value = pro(i)

Next i

Set objOpenSTAAD = Nothing

 

End With

 End Sub