Something like this would work. I don't know if there's anything more efficient though.
Dim oWkBook As Workbook
Dim bCheck As Boolean
bCheck = False
For Each oWkBook In Workbooks
If UCase(oWkBook.FullName) = UCase("C:TEMPBook1.xls") Then
bCheck = True
Exit For
End If
Next
If bCheck Then
'Your code
MsgBox "hi"
End If
HTH
Like this thread? Share it with others