Hi All, I want to loop thru all the controls on a Calc sheet and return their properties - below is the Excel VBA code to do this, Me is shorthand for the sheet that has focus.
I haven't been able to find how to do this in OpenOffice Calc Basic.
Cheers and thks.
7 For i = 1 To Me.OLEObjects.Count
8 Debug.Print Me.OLEObjects(i).ZOrder
9 Debug.Print Me.OLEObjects(i).name
10 Debug.Print Me.OLEObjects(i).ProgId
11 Debug.Print Me.OLEObjects(i).Height
12 Debug.Print Me.OLEObjects(i).Width
13 Debug.Print Me.Shapes(i).OLEFormat.Object.Object.BorderStyle
14 Debug.Print Me.Shapes(i).OLEFormat.Object.Object.BackColor
15 Debug.Print Me.Shapes(i).OLEFormat.Object.Object.ForeColor
16 Debug.Print Me.Shapes(i).OLEFormat.Object.Object.Font
17 Debug.Print Me.Shapes(i).OLEFormat.Object.Object.FontSize
18 On Error Resume Next ' Control properties vary
19 Debug.Print Me.Shapes(i).OLEFormat.Object.Object.Caption
20 Debug.Print Me.Shapes(i).OLEFormat.Object.Object.Text
21 Debug.Print Me.Shapes(i).OLEFormat.Object.Object.MultiLine
22 On Error GoTo 0 'turn on error handling
23 Debug.Print "=========================="
24 Next
Edit: Changed subject, was Calc Basic Make your post understandable by others -- MrProgrammer, forum moderator |