View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 1,726
Default Can I call a macro from ouside excel?

You could add the code to Workbook_Open, it will then automatically run when
you open the workbook


Private Sub Workbook_Open()

End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"DannyS" wrote in message
...
For example, I want to open the spreadsheet W.xls, and run the macro x()

I really want a string that looks something like

C:\Spreadsheets\W.xls #x#

That will open W.xls then run x()

Is this possible?