Check for open workbook

D

Dave Peterson

I'd just try to close it:

on error resume next 'in case it isn't open
workbooks("tempdata.xls").close savechanges:=true 'false???
 
T

Tom Ogilvy

On error Resume next
workbooks("Tempdata.xls").Close SaveChanges:=False
On Error goto 0
 
O

Oldjay

Thanks

Dave Peterson said:
I'd just try to close it:

on error resume next 'in case it isn't open
workbooks("tempdata.xls").close savechanges:=true 'false???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top