Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys
i have written a following Macro Function
Function CountNumberOfRows()
Set Sheet = ActiveDocument.GetSheetObject("CH01")
Rows = Sheet.GetNoOfRows
CountNumberOfRows = Rows
End Function
Now i m calling the above Macro Function in backend Like as below :
Let v = CountNumberOfRows();
But the variable v is not not getting any value.....
Please help
Just an example. You'll have to modify it to your needs yourself:
Sub GetIDs
Objects = ActiveDocument.ActiveSheet.GetSheetObjects
For i = lBound(Objects) To uBound(Objects)
id = Objects(i).GetObjectId
msgbox("ID = " & id)
next
end sub
You can't access UI objects in the script, i.e. during reloads. So the macro can't get the number of rows.
Hi Gysbert
thanks for the reply
Can you tell how to access the Sheetobjectid of the objects in each sheet.
I want the Id of the Charts in a sheet
You can access them with a macro like you posted. But the macro only works in the UI, in interactive mode. It won't work when you call the macro in the load script.
no..actually i want the id of the sheet objects in a particular sheet. for example if have 3 straight table in Sheet 1 then i want CH01,CH02,CH03
Just an example. You'll have to modify it to your needs yourself:
Sub GetIDs
Objects = ActiveDocument.ActiveSheet.GetSheetObjects
For i = lBound(Objects) To uBound(Objects)
id = Objects(i).GetObjectId
msgbox("ID = " & id)
next
end sub
can i get the list of variables which i have created in variable Overview in macro