View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default if its open...close it

If the workbook Commission had the .xls extension, I think I'd specify it:

On Error Resume Next
Workbooks("commission.xls").Close SaveChanges:=False
On Error GoTo 0



JE McGimpsey wrote:

If all you're doing is closing "commission":

On Error Resume Next
Workbooks("commission").Close SaveChanges:=False
On Error GoTo 0


In article ,
choice wrote:

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


--

Dave Peterson