Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI All,
I have two list boxes one is for Month and the other is for Year .
And i have straight table which iam importing to export by Macro.
I wanted to know how can we save the file path by selected year and month.
i need to create a variable for month and year then i want to bring this variable in the path of macro .
Can some one help me
Try something like:
filepath="D:\EXCEL TO EXPORT\"
Set yearVar=ActiveDocument.GetVariable("vYear")
Set monthVar=ActiveDocument.GetVariable("vMonth")
Set filename=yearVar&monthVar
....
XLDoc.SaveAs filePath & filename
You can define variables like:
vYear=YearField
vMonth=MonthField
And then use them in your macro. If you need help there too, try to share your macro code here.
Thanks Trescco ,
i have already created the variable , i have already defined a path iam sending u the file ,
actaully when the file is being saved it has to give me which year and whivh month .
i hope u undertood .
Plz find the attachment
Hi Roy,
Try to create a variable in macro itself instead of creating in qlikview and call this variable in your macro.
sub ( .... )
dim var1=XXXX
path: c://New Folder/var1
Hope it help.
Regards
KC
Try something like:
filepath="D:\EXCEL TO EXPORT\"
Set yearVar=ActiveDocument.GetVariable("vYear")
Set monthVar=ActiveDocument.GetVariable("vMonth")
Set filename=yearVar&monthVar
....
XLDoc.SaveAs filePath & filename
HI Jyothish
Iam not understanding how to do it
I have already attached the macro code . Which will export different excel files by country by branch and by city
where do i define the variable ?