Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatically Open a Linked Excel Workbook

Status
Not open for further replies.

Harlequin007

Technical User
Feb 9, 2004
249
GB
Guys

I'm sure there's a FAQ or post about this but couldn't find one.

I need to have a workbook execute (open) another (linked) workbook on the "BeforeOpen" event.

I just need some help with the syntax if possible...

----------------------------
Cogito Ergo Sum [jester2]
----------------------------
 
A workbook doesn't have a 'BeforeOpen' event - when would it run? Excel can't even see the code until it has opened the workbook, by which time it's too late!

You could put the following in the 'Workbook_Open' event of your first workbook:

Code:
Workbooks.Open "ANALYSIS.XLS"

Replace "ANALYSIS.XLS" with the name (and path, if necessary) of the book you want to open. This will open it as soon as your first book opens.

Nelviticus
 
You may also take a look at the RefreshAll or OpenLinks methods of the Workbook object.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks PHV.

Before Open eh...?

I think I'll file that under "Ideas to keep to yourself"

----------------------------
Cogito Ergo Sum [jester2]
----------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top