If DIR("C:\Spectrum\ThisFileName.XLS")<>"" then
'file already exists
End If
Bob Umlas
Excel MVP
KPMG Tax Technology Practice
[log in to unmask]
To see detailed explanation of how array formulas work. visit:
http://www.emailoffice.com/excel/arrays-bobumlas.html
-----Original Message-----
From: Gerena, Dan [mailto:[log in to unmask]]
Sent: Tuesday, January 30, 2001 11:00 AM
To: [log in to unmask]
Subject: Macro to check if file exists already
I've got a program that creates a file automatically in a specified folder
based on a person successfully completing a custom wizard.
Any way to check to see if the .xls file already exists? I know it'd be
housed in their
C:\Spectrum folder, so if it exists I'll give them the option thru a custom
form to cancel the operation to avoid overwriting the file.
Dan Gerena
Manager, Financial Systems
Kaleida Health
887-5931
[log in to unmask]
*****************************************************************************
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorized.
If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or omitted to be taken in reliance on it, is prohibited
and may be unlawful. When addressed to our clients any opinions or advice
contained in this email are subject to the terms and conditions expressed in
the governing KPMG client engagement letter.
*****************************************************************************