LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default vbcsript calls excel macro

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in updating all worksheets of a workbook using a macro that calls another macro [email protected] Excel Programming 3 March 20th 06 05:21 AM
Non-blocking calls to Excel Macro using OLE Automation BW Excel Programming 5 August 3rd 05 09:13 PM
one macro calls the other ebony Excel Programming 1 January 7th 04 05:27 AM
Macro Calls lchhat Excel Programming 5 November 14th 03 03:56 PM
"This macro calls that macro, which calls .."-how many? Ed[_9_] Excel Programming 2 November 3rd 03 10:02 PM


All times are GMT +1. The time now is 08:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"