Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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