Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

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

Tags (1)
1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Object required: 's.GetActiveSheetObjects'

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
MVP & Luminary
MVP & Luminary

Object required: 's.GetActiveSheetObjects'

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

Not applicable

Object required: 's.GetActiveSheetObjects'

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)