View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
CRayF CRayF is offline
external usenet poster
 
Posts: 115
Default The myworkbook.xls Auto_Open() macro won't run if started by a VBS

I've created an example.VBS file that contains:
-----------------
Dim XLApp
Set XLApp = CreateObject("Excel.Application")
xlapp.visible = true
xlapp.workbooks.open "myworkbook.xls"
-----------------

In the myworkbook.xls is an auto run macro
-------------
Sub Auto_Open()
'some code
End Sub
-------------

If I start the myworkbook.xls by itself it runs the Auto_Open() macro *just
fine*. However, when my myworkbook.xls is called via the example.VBS script
it DOES NOT auto run the macro.
Any clues?