View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ingolf Ingolf is offline
external usenet poster
 
Posts: 32
Default Check to see if a file is already open

Hi Jason

This will check every open workbook by it's name. If your workbook is
already open it will return True in the variable fileopen.

Dim FileOpen As Boolean
Dim wb As Workbook
FileOpen = False
For Each wb In Application.Workbooks
If wb.Name = "NameOfYourWorkbook.xls" Then
FileOpen = True
Exit For
End If
Next 'wb

Regards
Ingolf