Microsoft KB Archive/31464

Checking for Open Files in Excel PSS ID Number: Q31464 Article last modified on 02-26-1993 PSS database name: W_eXceL

2.x 3.00

WINDOWS | OS/2

Summary:

There are several ways to check for an open Excel file. One of the most direct methods makes use of the Excel functions MATCH and WINDOWS.

The following example combines these functions in an IF statement:

=IF(ISERROR(MATCH(“sheet1.xls”,WINDOWS,0)), ALERT(“not open”),ALERT(“open”))

The ISERROR function provides a true or false condition for branching within the IF statement. The ALERT functions are used for the purpose of illustration and can be replaced with other functions.

Additional reference words: 2.0 2.00 2.01 2.1 2.10 3.0 3.00

Copyright Microsoft Corporation 1993.