View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
dominicb[_90_] dominicb[_90_] is offline
external usenet poster
 
Posts: 1
Default Problem opening a file


Good morning AmyTaylor

The code below will test if a named file is open:

Sub CheckFile()
On Error Resume Next
Set a = Workbooks("\\server1\files\amy\Activity.xls")
If Err = 0 Then
Windows("\\server1\files\amy\Activity.xls").Activa te
End If
End Sub

If the file is already open then it will be made the active sheet. If
not, nothing happens.

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=396055