View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gee...[_2_] Gee...[_2_] is offline
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