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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
johnan
Creator III
Creator III

Macro to call a program

Hi,
I have a button to call a program in QV. Can I load button so that after the script is loaded to automatically make a button press? Or a macro for this?

1 Solution

Accepted Solutions
Not applicable

Properties>Layout>Show..Condtional (1<>1)

View solution in original post

16 Replies
manishkumar75
Partner - Creator II
Partner - Creator II

Hi Johnan,

As per my understanding (I may be wrong) , you want a macro to be run on the opening of QlikView document. If it is so, you can assign that macro to Document Event Triggers - > On Open , using Document properties and selecting Macros tab.

- Manish

johnan
Creator III
Creator III
Author

Yes, thats correct. But, when you create a button, you can call a program. I have a "batfile" that i want to execute after reloading the document.

If i can call that batfile in macro and then execute after reloading the script, i't would be nice.

Sorry for my bad englishHuh?

Not applicable

Hello Johnan,

You can perhaps use a macro like this:


Sub LaunchBatch
set app=ActiveDocument.GetApplication
app.Launch "c:\test.bat",""
End Sub


regards Mark

johnan
Creator III
Creator III
Author

Hi, i tried but:

Expected end of statement

in macro



Not applicable

Try this:

doc = ActiveDocument
b = doc.GetSheetObject("BU99")
b.Press

Regards,

Gordon

Not applicable


johnan wrote:
Hi, i tried but:

Expected end of statement
in macro


It works over here, what version of QlikView do you use? Did you point to an existing bat file?





johnan
Creator III
Creator III
Author

8.50

johnan
Creator III
Creator III
Author

Hi,

got this error:

Object required: 'doc'



Not applicable

Copy/paste lost 'set'.

Set doc = ActiveDocument
Set b = doc.GetSheetObject("BU99")
b.Press