PC Review


Reply
Thread Tools Rate Thread

Check for open workbook

 
 
=?Utf-8?B?T2xkamF5?=
Guest
Posts: n/a
 
      20th Oct 2006
How do I check to find out if Tempdata.xls is open and if it is close it?
 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      20th Oct 2006
I'd just try to close it:

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



Oldjay wrote:
>
> How do I check to find out if Tempdata.xls is open and if it is close it?


--

Dave Peterson
 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      20th Oct 2006
On error Resume next
workbooks("Tempdata.xls").Close SaveChanges:=False
On Error goto 0

--
Regards,
Tom Ogilvy


"Oldjay" wrote:

> How do I check to find out if Tempdata.xls is open and if it is close it?

 
Reply With Quote
 
Oldjay
Guest
Posts: n/a
 
      17th Apr 2008
Thanks

"Dave Peterson" wrote:

> I'd just try to close it:
>
> on error resume next 'in case it isn't open
> workbooks("tempdata.xls").close savechanges:=true 'false???
> on error goto 0
>
>
>
> Oldjay wrote:
> >
> > How do I check to find out if Tempdata.xls is open and if it is close it?

>
> --
>
> Dave Peterson
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA to check is someone else has a workbook open Jim K. Microsoft Excel Misc 2 29th Aug 2008 04:32 PM
Check if workbook is open... John Microsoft Excel Programming 2 10th Jun 2008 10:04 PM
If Then to check if a workbook is open =?Utf-8?B?U2hhd24=?= Microsoft Excel Misc 5 25th Nov 2006 04:29 PM
How check if workbook open? =?Utf-8?B?SWFuIEVsbGlvdHQ=?= Microsoft Excel Programming 7 14th Apr 2006 08:54 PM
Check for open workbook georgio Microsoft Excel Programming 2 20th Nov 2004 11:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:39 AM.