This content has been marked as final. Show 2 replies
I have snatched this loop macro out on the great www. and combined it with an export macro. I have created a button with the run macro command. Last month when I created this it worked perfectly.. Now suddenly i can't make it execute. If i run the export macro on it's own. it's working fine. so it must be the loop which is of somehow. But have can it's suddenly stop working? ( i have checked that allow system access is granted). Are there other places where you by mistake can disable the security in qlik, so it dosn't work
The loop looks in the table i'm loading seperatly. i have made a listbox of all the values in it. it then selects the first. export, select next export etc.
What is wrong. the code or some kind of security.. I'm almost 100% sure no one has altered the code. i have tried copying from new. Checking the spelling of the macro name, the field name etc.
MaxRow = ActiveDocument.Variables("vNoofrows").GetContent.Value
For x = 0 to MaxRow
set mySelections = ActiveDocument.fields("Selection").GetSelectedValues(1)
if mySelections.Count = 0 then
ValueToSelect = val.Item(0).Text
IamDone = " "
for i=0 to val.Count-1
ValueToSelect = val.Item(i).Text
if IamDone = "X" then
if val.Item(i).Text = mySelections.Item(0).text then
IamDone = "X"