View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Error with Auto Open Macro

Since Personal.xls is hidden, you should not try to select and activate in
that workbook.

--
Regards,
Tom Ogilvy

"David" wrote in message
...
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?