View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Sofia K Sofia K is offline
external usenet poster
 
Posts: 2
Default Running a VB Script

I thought so too but I checked my code and the script opens the excel
file, runs the macro (which does not try to open it again), and saves
and closes the excel file.

Here's the script:

Dim XL
Dim WB
Set XL = CreateObject("Excel.Application")
Set WB = XL.Workbooks.Open
("C:\2dseismiclabels.xls")
msgbox("about to print labels")
xl.Run "Macro1"
msgbox("finished printing labels")
wb.save
WB.Close
XL.Quit
Set WB = Nothing
Set XL = Nothing

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!