Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

macro:variable

Hello at ALL,

I would to know why this WV example doesn't work.

------------------------------------------
sub var

set a= ActiveDocument.Variables("Variable1")
a.SetContent "123",true

end sub

------------------------------------------

returns an error..

Thanks

Best Regards,

Slash

4 Replies
Specialist
Specialist

AW:macro:variable

Hi,

have you already added Variable1 (eg in Variable overview)?

Rgds,
Joachim

Highlighted
Not applicable

AW:macro:variable

Hi,

No I have not. Why= first I have to create a variable called "a" and after I have to add and test the API script?

Thanks

Best Regards,

Slash

Highlighted
Specialist
Specialist

AW:Re: AW:macro:variable

Yo have to create "Variable1" first, not "a". "a" is only the object reference in VBscript to this "Variable1". If "Variable1" does not exist, then the object "a" cannot be instantiated, thus the macro fails.

Rgds,
Joachim

Highlighted
Not applicable

AW:Re: AW:macro:variable

Ok, now the variables works..

Thans

Best Regards

Ciao

Slash