View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dick Kusleika[_4_] Dick Kusleika[_4_] is offline
external usenet poster
 
Posts: 595
Default Test to see if a workbook is open

Alex

http://www.dicks-blog.com/archives/2...rkbook-exists/

--
Dick Kusleika
Excel MVP
Daily Dose of Excel
www.dicks-blog.com

Alex St-Pierre wrote:
Hello,
I would like to make a test before opening a file to see if there is a
workbook (same name) already opened.
if( workbook test.xls is open) then
msgbox("You must close the file first")
exit sub
end if
workbook.Open "C:\test.xls"
Thanks,
Alex