Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Object required: 's.GetActiveSheetObjects'

Hi,

The following simple code taken from API returned the error Object required: 's.GetActiveSheetObjects'

The eror is makred on the third line.

Qlikview version 9.00 on Windows XP

sub GoDown
set s = ActiveDocument.ActiveSheet
set objs = s.GetActiveSheetObjects.SheetObjects
end sub

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You can't mix GetActiveSheetObjects and SheetObjects.

GetActiveSheetObjects returns an array of sheet objects.

SheetObjects(i) returns a single sheet object and requires a parameter, the index of the sheet object array.

-Rob

View solution in original post

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You can't mix GetActiveSheetObjects and SheetObjects.

GetActiveSheetObjects returns an array of sheet objects.

SheetObjects(i) returns a single sheet object and requires a parameter, the index of the sheet object array.

-Rob

Not applicable
Author

Thanks for the clarification.

I got that code from the API Guide version 9.

The following replacement worked fine:



Objects = ActiveDocument.ActiveSheet.GetSheetObjects
For i = lBound(Objects) To uBound(Objects)
If Objects(i).GetObjectType = 10 Then 'pivot tables
set pivot = Objects(i)