Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Global_Variables

Hi,

can anyone help me on this issue

I have two macros, I have created one varible in first macro i want to use that variable in second macro with out creating the variable

//First Macro

Sub exportfirst

set f = ActiveDocument.GetField("Managed Segment L1 Desc")

End sub

//Second Macro

Sub Copy_Chart_Obj

if IsEmpty(f.GetSelectedValues) then

set pv = f.GetSelectedValues // the variable "f" i want to use directly here

else

set pv = f.GetPossibleValues(1000)

end if

End sub

can anyone help me on this issue please as soon as possible



2 Replies
suniljain
Master
Master

In Sub routine ,

the scope and lifetime of variable is up to that subroutine only. but if you want use sames variable in Multiple Sub routine you have to delare in applivation.

Not applicable
Author

hi Sunil

Thanks for ur reply

Can you please provide a sample application for better understanding

Thanks,

Pavan