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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cloning object with macro

Hello,

Is there a way to clone and move an object via vb-macro?

Cheers,

Martin

Labels (1)
1 Solution

Accepted Solutions
johnw
Champion III
Champion III

I never went anywhere with this, but here's an example given to me by Rob Wunderlich of cloning an object. This was from back in 2008, so there may be better approaches today.

View solution in original post

3 Replies
johnw
Champion III
Champion III

I never went anywhere with this, but here's an example given to me by Rob Wunderlich of cloning an object. This was from back in 2008, so there may be better approaches today.

Not applicable
Author

Ok, tks will try this. The obvious approach i tried before was:

SET objGraph = ActiveDocument.ActiveSheet.CreateObjectFromXmlPropertiesFile("C:\objGraph.xml")

wich in 9 sr3 generates an error (but still creates the object!)

I guess the Clone should be added to the API sometime.

Tks

Martin



Not applicable
Author

Hello,

The lbound wont return the correct object it seems (i have a document with many many objects)

I found a workaround for the problem though. I catch the window-title for the cloned object and then loop

all objects to get the one with matching title.

Cheers