Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On May 18th at 10AM EDT we will answer your QlikView questions live. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

pls check the macro code

Hi to all,

how to create a new variable in another QVW file by using macro.

I tried like this but it showing error. What i should modify in below code.

Sub NewVar

set UserFile = App.OpenDoc ("Mydoc123.qvw","","")

set v2 =UserFile.CreateVar("vGet")

              ActiveDocument.ClearAll false  

End Sub

Pls any one can share your experience on this.

Regards

Venkat

1 Solution

Accepted Solutions
kaushiknsolanki

Hi,

   Use below code.

Sub NewVar 

set App = ActiveDocument.GetApplication
set UserFile = App.OpenDoc ("Mydoc123.qvw","","")

UserFile.CreateVariable "vGet"

End Sub  

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".

View solution in original post

1 Reply
kaushiknsolanki

Hi,

   Use below code.

Sub NewVar 

set App = ActiveDocument.GetApplication
set UserFile = App.OpenDoc ("Mydoc123.qvw","","")

UserFile.CreateVariable "vGet"

End Sub  

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".

View solution in original post