Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I need to write a macro in which I want to activate sheets
I know that the syntax is as follows:
ActiveDocument.GetSheetByID("SH03").Activate
however the SH03 I have it in a variable
Please advise
Hi,
Say the variable is named vSheet in the QlikView application. Then the code should look like
Set s = ActiveDocument.Variables("vSheet")
ActiveDocument.GetSheetById(s.GetContent.String).Activate
Hope that helps.
Miguel
EDIT: Note that you can use a direct button action instead of a macro to activate a sheet depending on the value of a variable. Better off using this instead of using macro.
Hi,
Say the variable is named vSheet in the QlikView application. Then the code should look like
Set s = ActiveDocument.Variables("vSheet")
ActiveDocument.GetSheetById(s.GetContent.String).Activate
Hope that helps.
Miguel
EDIT: Note that you can use a direct button action instead of a macro to activate a sheet depending on the value of a variable. Better off using this instead of using macro.