Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Run Execute Excel Macro
macroname = "MyMacro" ;Specify valid macro name cXLS = AskFileName("Select Excel WorkBook",".\","Excel Files|*.xls|","*.xls",1) DB = ObjectOpen("Excel.Application") DB.Visible = @TRUE DB.UserControl = @TRUE oAPP = DB.Workbooks oAPP.Open(cXLS) ;"sample.xls!MyMacro" runme = StrCat(FileRoot(cXLS),".",FileExtension(cXLS),"!",macroname) mySum = DB.Run(runme) Message( "Macro result: ",mySum) oAPP.Close() ObjectClose(oAPP) DB.Quit() ObjectClose(DB) Exit
Article ID: W15641
File Created: 2003:05:13:11:29:20
Last Updated: 2003:05:13:11:29:20