View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
tolgag[_31_] tolgag[_31_] is offline
external usenet poster
 
Posts: 1
Default How to find if a workbook is open

If you want to avoid use an On Error block, try following function :

Function IsWBOpen(strName As String) as Boolean

Dim w as Workbook,
Dim bResult as Boolean

bResult = False

For each w in Workbooks
if w.name = strName then
bResult = True
exit for
end if
Next

IsWBOpen = bResult

End Functio

--
Message posted from http://www.ExcelForum.com

 
ExcelBanter Database Error
Database Error Database error
The ExcelBanter database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.excelbanter.com home page, then try to open another page.
  • Click the Back button to try another link.
The www.excelbanter.com forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.