Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
oZZee2021
Contributor
Contributor

GetSheetObject Gives Object Required Error in Excel Macro

Hello,

First of all I am very new to qlikview so my question might be very wrong but I will try to explain as much as I can. In my company we are getting some reports via qlikview app which is shared via accesspoint with us. I realized that I can't write script directly inside this app as it is protected. (It took me a week to figure out why I can't .. )

Now I found out I can control and this qlikview app via VBA macro which I am writing in excel. Everything goes fine until I am trying to copy one simple chart and all over the internet below code is suggested;

ActiveDocument.GetSheetObject("id").CopyValuesToClipboard True

one I run this code I am having object required error like this object doesnt exist but as you can see below screenshot it is in my doucment (newly created by me). Can anyone think of a reason why it happens? 

 

Note that I tried id with both as CH714 and CH714-158

ActiveDocument.GetSheetObject("CH714").CopyValuesToClipboard True

oZZee2021_0-1617696291795.png

 

oZZee2021_1-1617696489539.png

 

Thank you very much in advance.

Labels (3)
1 Solution

Accepted Solutions
oZZee2021
Contributor
Contributor
Author

Hi All again,

I tried to printout all the object ids and it turned out that they have Server\ at the beginning of each id that is why it was not finding.

View solution in original post

1 Reply
oZZee2021
Contributor
Contributor
Author

Hi All again,

I tried to printout all the object ids and it turned out that they have Server\ at the beginning of each id that is why it was not finding.