View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Macro Skip workbook

dim wkbk as workbook
on error resume next
set wkbk = workbooks("book1.xls") '<- no drive, no path, just filename
on error goto 0

if wkbk is nothing then
'open it, with drive, path, filename
set wkbk = workbooks.open(filename:="c:\folder\folder\book1.x ls")
end if



wrote:

I have created some vb to open another work book but if it is open it
goes to debug
anyone have a skip if open script

cheers

jack


--

Dave Peterson