View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default if its open...close it

Dim bk as Workbook
On error resume next
set bk = workbooks("Commission.xls")
On error goto 0
if bk is nothing then exit sub

--
Regards,
Tom Ogilvy


"choice" wrote in message
...
i have sheet workbook "register" and "commission"
i have a macro in "register" that closes commission.
however i need a if statement that say if "commission" isnt open...dont

run