LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default If open, go to, else open

I have the following for some buttons.
To open I have:
Workbooks.Open Filename:=
"\\bo-10\ToP\ToP Bark\PI\aPM\PMP.xls"

I then have another button to go back to that sheet if
it's already open.
Windows("PMP.xls").Activate

I need to know what the "IF" statement is so I dont' have
to have 2 buttons.
How do I say:
If "\\bo-10\ToP\ToP Bark\PI\aPM\PMP.xls" is open, activate
PMP.xls, else open "\\bo-10\ToP\ToP Bark\PI\aPM\PMP.xls"

I keep trying to do it and getting it wrong.
Help?
Thank you,
Gee
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ON OPEN VBA Code input incorrectly now excel sheet wont open mmartin New Users to Excel 1 February 16th 11 11:33 PM
Opening Excel, Book1 opens, remains open with other workbook open DanieB Excel Discussion (Misc queries) 0 September 3rd 09 08:23 AM
excel 2003 saved file will not open without a blank workbook open Bob Excel Discussion (Misc queries) 4 November 11th 06 04:24 PM
Open email windows can't open, excel shreadsheet file .xls ? skiz Excel Discussion (Misc queries) 0 October 2nd 05 07:03 PM
file open via IE hyperlink causes already open files to shrink and tile Marc Setting up and Configuration of Excel 0 May 4th 05 08:13 PM


All times are GMT +1. The time now is 08:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"