Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
arngue
New Contributor III

How to create a macro to clear variables using For statement

Hi everyone,

I don't know why this Macro is failing.

 

Sub Clear

    For i = 0 to 19 Step 1
    
        ActiveDocument.Variables("vGroup"&i).SetContent "",true
    
    Next

End Sub

 

Anyone see something wrong?

What I need is to clear variables vGroup from 1 to 19

Labels (3)
1 Solution

Accepted Solutions
mwoolf
Honored Contributor II

Re: How to create a macro to clear variables using For statement

For loop should start with 1, not zero?

3 Replies
mwoolf
Honored Contributor II

Re: How to create a macro to clear variables using For statement

For loop should start with 1, not zero?

albert_guito
Contributor II

Re: How to create a macro to clear variables using For statement

Hi,

Your code is running right for me.

What kind of mistake are you getting for?

Ag+

Ag+
arngue
New Contributor III

Re: How to create a macro to clear variables using For statement

Sorry, my fault, idiot me...

 

Thanks for Awnsers!