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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Export ListBox with Macro

Hi all, first sorry for my bad english.

I'm using this macro to export data from a list box:

function ServerExportEx

    Set st = ActiveDocument.GetSheetObject("LB35")

          st.ServerSideExportEx "C:\FTP\Clientes\"&"MAILS"&".TXT",";",1

end function

The problem is that this macro export all values from list box, and i need only possible values to select, not the excluded values.

Where i need to change the macro?

I hope can understandme and thanks.

Luciano.-

1 Reply
IAMDV
Master II
Master II

Hi Luciano,

Have you considered using...Right click on List Box > Copy to Clipboard > Copy Possible Values and paste them in Excel? You can use this approach without using macros.

However, if you still need macros then you need something like this...

Sub GetPossibleValueFromLB

set LB = ActiveDocument.GetSheetObject("LB01")

boxvalues=LB.GetPossibleValues

for i = lbound(boxvalues) to ubound(boxvalues) 

    msgbox(boxvalues(i))

next

End Sub

Please integrate the above code with your original code.

Cheers,

DV


www.QlikShare.com