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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro to run an Excel Macro

Hi All,

I have an Excel Worksheet template that I dump data into from Qlikview. I have a macro in Qlikview that dumps all the different tables into this Excel template but to do some finishing touches on the template I have a Macro in the worksheet that I need to run. How do I call this macro from within my qlikview macro?

Thanks,

Austin

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

There are plenty of examples online if you google for example: "Vbscript run macro in Excel"

Here's an example I think should work. Not tested:

Set objExcel = CreateObject("Excel.Application")

objExcel.Visible = True

Set objWorkbook = objExcel.Workbooks.Open("C:\Documents and Settings\My Documents\Test.xls")

objWorkbook.Application.run "Test.xls!Macro.Macro"

View solution in original post

2 Replies
Anonymous
Not applicable
Author

There are plenty of examples online if you google for example: "Vbscript run macro in Excel"

Here's an example I think should work. Not tested:

Set objExcel = CreateObject("Excel.Application")

objExcel.Visible = True

Set objWorkbook = objExcel.Workbooks.Open("C:\Documents and Settings\My Documents\Test.xls")

objWorkbook.Application.run "Test.xls!Macro.Macro"

Not applicable
Author

Thanks Johannes,

It worked like a charm.