Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Detect if file is open

Is there a method to detect if a file is already in use by someone, before I
open it?

Chad


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default Detect if file is open

Any particular kind of file?

"Chad" wrote in message
...
Is there a method to detect if a file is already in use by someone, before

I
open it?

Chad




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Detect if file is open

Let's start with just Excel spreadsheets for now.

chad


"Bob Kilmer" wrote in message
...
Any particular kind of file?

"Chad" wrote in message
...
Is there a method to detect if a file is already in use by someone,

before
I
open it?

Chad






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Detect if file is open

Just use this function:

Function IsWorkbookOpen(WorkbookName as String) As Boolean
Dim Wkb as Workbook
on error resume next
Set Wkb = Workbooks(WorkbookName)
If Not Wkb Is Nothing Then IsWorkbookOpen = True
End Function


Just have to pass the workbook name to the function...if
it is open, it will return TRUE, if it is closed, FALSE

Seth

-----Original Message-----
Is there a method to detect if a file is already in use

by someone, before I
open it?

Chad


.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Detect if file is open

http://support.microsoft.com/default...;EN-US;q138621
XL: Macro Code to Check Whether a File Is Already Open

Chad wrote:

Is there a method to detect if a file is already in use by someone, before I
open it?

Chad


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Detect open-state of xls from outside Excel Waterloo Excel Discussion (Misc queries) 2 May 6th 09 10:01 AM
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Excel Discussion (Misc queries) 0 April 23rd 09 08:53 PM
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Setting up and Configuration of Excel 0 April 23rd 09 08:53 PM
excel 2003 saved file will not open without a blank workbook open Bob Excel Discussion (Misc queries) 4 November 11th 06 05:24 PM
In Excel - Use Windows Explorer instead of File Open to open file KymY Excel Discussion (Misc queries) 1 August 5th 06 09:59 PM


All times are GMT +1. The time now is 12:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"