Thread: Workbook Open?
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Workbook Open?

My prefered method...This one opens the book if it is not open...

dim wbk as workbook

on error resume next
set wbk = workbooks("MyBook.xls")
on error goto 0

if wbk is nothing then
msgbox "Opening the book now"
set wbk = workbooks.Open("C:\MyBook.xls")
end if
--
HTH...

Jim Thomlinson


"ArthurJ" wrote:

How can I test to see if a particular workbook is open?

Thanks,
Art