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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

copy only selected values to excel macro

Hi everyone,

I have a listbox and I have for example 3 numbers selected and I only want to copy these numbers to excel.

my code right now is:

ActiveDocument.GetSheetObject("LB07").Restore

    ActiveDocument.GetSheetObject("LB07").CopyTableToClipboard true   

    XLSheet.Paste XLSheet.Range("B2")

    XLSheet.Cells.EntireColumn.AutoFit

    ActiveDocument.GetApplication.WaitForIdle

    ActiveDocument.ClearCache

the problem is that this code copys the whole listbox to excel but I only want the 3 selected values to be copyed. How can I do this?

regards

MT

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Use a table box instead of the listbox. Or use an expression aggr(MyField, MyField) for the listbox instead of the field MyField.


talk is cheap, supply exceeds demand
Not applicable
Author

ok it is a quiet good workaround but I am not really satisfied. but thanks for your help

regards,

MT