Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to call macro in a loading script ?


hi,

Qlikview Document edit module,maro code:

sub kk

....

end sub

how to call macro in a loading script ? is it possible to execute a macro?

Thanks in advance & best regards

12 Replies
tresesco
MVP
MVP

Try like:

LET vVar= kk();

Not applicable
Author

hi

LET vVar= kk();  is not working

jagan
Luminary Alumni
Luminary Alumni

Hi,

Check this URLs

Execute a Macro inside load script

Example Macro:

Function CreateFolder()  

     Dim objFSO  

     Set objFSO = CreateObject("Scripting.FileSystemObject") 

     objFSO.CreateFolder("C:\MacroTestFolder") 

End Function 



QlikView Load Script:

  1. LET CreateFolder = CreateFolder(); 

Regards,

Jagan.

tresesco
MVP
MVP

Could you post your sample app that demonstrates the issue?

luciancotea
Specialist
Specialist

See Jagan's example.

Be aware that you cannot access interface elements at LOAD SCRIPT time. For example, if you want to export a chart, it will not work.

Not applicable
Author

hi

See attached

luciancotea
Specialist
Specialist

You can't access interface objects at LOAD SCRIPT time. You have to call your macro using a trigger after the script is run (like OnPostReload trigger)

Not applicable
Author

hi

See attached

tresesco
MVP
MVP

As said by Lucian Cotea, you can't access UI object at load script. While you call a macro in the script, it is expected that the macro function would return a value whic is not the case with your macro.