View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
David David is offline
external usenet poster
 
Posts: 1,560
Default Error with Auto Open Macro

I have created a simple macro named Auto_Open and saved in in Personal.XLS. I
want the macro to start automatically and go to sheet 1, cell A1. Here is the
macro:

Sub Auto_Open()
Sheets(1).Activate
Range("A1").Activate
End Sub

But when I start excel trying to open a file, I get an error before the
worksheet even comes up. It is a run-time error 1004, Method 'Sheets' of
object '_Global' failed. What am I doing wrong?