Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have a simple script that should open a workbook, run a macro and save the file. Everything except the macro part works fine. The file opens and saves but macro does not run. Can someone please advise me what am I doing wrong. Below is the script. Thanks Dim objExcel Dim objWorkBook Set objExcel = CreateObject("EXCEL.APPLICATION") Set objWorkBook = objExcel.Workbooks.Open("C:\File1.xls") objExcel.DisplayAlerts=False objExcel.Run "PERSONAL.xls!FORMAT" objWorkBook.SaveAs "C:\file2.xls",44 objExcel.DisplayAlerts=True objWorkBook.Close True objExcel.Quit Set objWorkBook = Nothing Set objExcel = Nothing |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Open Personal.xls as well, it is not opened when running Excel in
automation. -- HTH Bob Phillips (remove xxx from email address if mailing direct) "vedran" wrote in message ... Hi, I have a simple script that should open a workbook, run a macro and save the file. Everything except the macro part works fine. The file opens and saves but macro does not run. Can someone please advise me what am I doing wrong. Below is the script. Thanks Dim objExcel Dim objWorkBook Set objExcel = CreateObject("EXCEL.APPLICATION") Set objWorkBook = objExcel.Workbooks.Open("C:\File1.xls") objExcel.DisplayAlerts=False objExcel.Run "PERSONAL.xls!FORMAT" objWorkBook.SaveAs "C:\file2.xls",44 objExcel.DisplayAlerts=True objWorkBook.Close True objExcel.Quit Set objWorkBook = Nothing Set objExcel = Nothing |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem in updating all worksheets of a workbook using a macro that calls another macro | Excel Programming | |||
Non-blocking calls to Excel Macro using OLE Automation | Excel Programming | |||
one macro calls the other | Excel Programming | |||
Macro Calls | Excel Programming | |||
"This macro calls that macro, which calls .."-how many? | Excel Programming |