Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
krishnaroopa
Contributor
Contributor

GetSheetObjects throws error

We are using QV Version 10.

I am trying to get all charts in a sheet, inside a macro.

set Objects = ActiveDocument.getSheet(0).GetSheetObjects

or

ActiveDocument.ActiveSheet.GetSheetObjects

Both is not working.. I am getting an error - "Object Required"

Please help

regards

KRS

1 Reply
Siva_Sankar
Master II
Master II

You can get the info you want by utilizing GetSheetObjects and GetObjectType (see the API Guide for more detail).  Here is an example that will display each chart Id in a message box:   Sub GetCharts  Objects = ActiveDocument.ActiveSheet.GetSheetObjects  For i = lBound(Objects) To uBound(Objects)  If obj.GetObjectType = 11 'Charts Then  msgbox("Chart: " & obj.GetObjectId)  End If  next End Sub     Once you have the object Id of the chart, you will use GetProperties. Then you can manipulate the properties and use SetProperties.  Regards. siva sankar