Solved how to run a excel macro using batch script or vba script?

August 30, 2012 at 10:06:35
Specs: Windows XP
how to run a excel macro using batch script or vba script?

See More: how to run a excel macro using batch script or vba script?

Report •

#1
December 30, 2012 at 09:26:44
✔ Best Answer
Option Explicit

On Error Resume Next

ExcelMacroExample

Sub ExcelMacroExample()

Dim xlApp
Dim xlBook

Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Open("C:\book53.xls", 0, True)
xlApp.Run "mymac"
xlApp.Quit

Set xlBook = Nothing
Set xlApp = Nothing

End Sub

change book53.xls : mymac to meet your names

:: mike


Report •
Related Solutions


Ask Question