Calling another worksheet

  • Thread starter Patrick Simonds
  • Start date
P

Patrick Simonds

I need this Auto_Open() macro to open the document listed and it works fine,
my problem is that :

1. I do not want it to become the active document
2. The name of the document running this routine can change. Otherwise I
would just add a statement to make C:/xxx.xls active.

Sub Auto_Open()
'
' AutoRun Macro
' '

Workbooks.Open Filename:="O:\PT_DRIVER_SCHED\Templates\EmployeeList.xls"

End Sub
 
Z

Zone

Patrick, If the document you want to be active is the same as the
document containing the Auto_Open sub, put this line in your Auto_Open
sub just before the End Sub line:
ThisWorkbook.Activate
James
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top