Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / December 2006

Tip: Looking for answers? Try searching our database.

Calling another worksheet

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Patrick Simonds - 09 Dec 2006 16:25 GMT
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
Dave Peterson - 09 Dec 2006 16:45 GMT
Add:

    thisworkbook.activate

to get back to the workbook with the code.

> I need this Auto_Open() macro to open the document listed and it works fine,
> my problem is that :
[quoted text clipped - 11 lines]
>
> End Sub

Signature

Dave Peterson

Zone - 09 Dec 2006 16:51 GMT
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
> I need this Auto_Open() macro to open the document listed and it works fine,
> my problem is that :
[quoted text clipped - 11 lines]
>
> End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.