View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default DOS Command Line

Just to expand on some of the useful suggestions already provided:

in G:\Customers\Vsource\Clarify.xls, in the workbook_open, you can call your
macro - you don't have to put the code there.

Private Sub Workbook_Open()
ThisWorkbook.Sheet1.RefreshData
End Sub

Make sure RefreshData has been declared Public.

It might be advisable to move it to a general module rather than have it in
a sheet module. Sheet modules should be used primarily for event related
code.

--
Regards,
Tom Ogilvy


"Chris" wrote in message
...
My batch file opens the following

"C:\Program Files\Microsoft Office\Office10
\excel.exe" "G:\Customers\Vsource\Clarify.xls"


How do I then run the macro "Sheet1.RefreshData" ?