Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

executing VB macro in script

Hello all,

I have craeted the macro

Sub SMS

set obj=ActiveDocument.GetSheetObject("CH1736")

obj.ExportEx "E:\ADW_Trigger\QlikviewSMS.txt",1

End Sub

Can anyone tell me how do i execute this in script?? So that desire output i.e a text file will be created in ADW_Trigger folder as mention in macro??

15 Replies
Anonymous
Not applicable
Author

Hi,

You need link your macro with any of Actions->External->Run Macro or Triggers->Actions...

Put button to the sheet, ope properties, go to Actions -> Add External -> Run Macro and put SMS tot he Macro Name field

Not applicable
Author

Hi Konstantins,

     i want with the execution of script Macro gets executed automatically not by adding button

vikasmahajan

On-Post Reload you can execute the same.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
jagan
Luminary Alumni
Luminary Alumni

Hi Rohit,

You can call macro by using

Button -> Actions -> Add -> External -> Run Macro and put SMS

or you can call this while reloading the document like this

Settings -> Document Properties -> Triggers -> Document Event Triggers -> OnPostReload -> Edit Actions ->Add -> External -> Run Macro and put SMS

Regards,

Jagan.

Not applicable
Author

Hi Vikas,

Tried it executing on post reload but txt file is not getting created in the folder

Anonymous
Not applicable
Author

One thing - On-Post reload trigger works with desktop application, but not under AccessPoint

Anonymous
Not applicable
Author

What does it mean automatically? after the reload apps? or when you activate chart object in the sheet?

Not applicable
Author

Hi Jagan,

     I have scheduled application on publisher but  post reload on macro ain't working , file is not getting created in folder,couldnot figure out why macro is not getting executed? is this because i scheduled it on publisher ? and  ain't there any way to write some commands in qlikview script in backend , so when application gets reload Macro will be executed too??

Anonymous
Not applicable
Author

Look my notes I've added recently

>>One thing - On-Post reload trigger works with desktop application, but not under AccessPoint