Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

VB Script : Dynamic object name

Hi Community,

I'm new to VB script.

In my project, I've got several text objects named Prod1... Prod10

I would like to copy text into a xls worksheet

     Prod1.Copytexttoclipboard

     XLDoc.Sheets("Sheet1").range("A1").select

     XLDoc.Sheets("Sheet1").paste

I would like to make a loop to do the same thing for Prod2, Prod3... Prod10

How can I do ?

Greg

4 Replies
Not applicable
Author

Hi Gregory, you can create the straight table (with out dimensions) with all the text objects expressions and export straight table into Excel file.

Not applicable
Author

I could however I would like to manage to do it in this way

Not applicable
Author

Ok then create the loop with Text Object ID's and paste into Excel file.

Not applicable
Author

I try, however I'm not sure about the syntax.

I think about something like?

for i = 1 to 10

Prod & i .Copytexttoclipboard


...


Next


How could I do it correctly