Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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"
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"
Thanks Johannes,
It worked like a charm.