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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
amien
Specialist
Specialist

looping though listbox and make selection eats memory .. how do i free memory?

The Items in the listbox that are selected are quit a few .. about 1000.

I want to make a selection and then export. But on the selecting itself to memory keeps on rising on Qv.exe.

How can i clear the memory after the selection?


ActiveDocument.Clearall
ActiveDocument.Sheets("SH01").Activate
Set Ftg = Activedocument.Fields("Column")
Set UrvFtg = Ftg.GetPossibleValues(1000)

For i= 0 to UrvFtg.Count-1

ActiveDocument.Fields("Column").Select UrvFtg.Item(i).Text
ActiveDocument.GetApplication.WaitForIdle

Next

end sub


1 Solution

Accepted Solutions
Anonymous
Not applicable

Try ClearCache.
Not sure if it helps, but worth trying.

View solution in original post

3 Replies
Anonymous
Not applicable

Try ClearCache.
Not sure if it helps, but worth trying.

Not applicable

I'm not sure if this would help, but I would try storing the value of UrvFtg.Count-1 in a variable instead of calling it in every for loop.

amien
Specialist
Specialist
Author

Thanks Both