Dir( ) Problem

D

Donald Lloyd

Hi,

In the Worksheet.Change event I have the following code snippet.

Fname = Range("G12") ' Filename
Fname = Fname & ".xls"
If Dir(Fname) <> "" Then
MsgBox Fname & " - There is already a file with this name. Please try
again", , "File Exists"
Target = ""
End If

This worked fine for a while but for some reason doesn't work anymore.
Application. EnableEvents is set to True and I've tried stepping through to
no avail.

Any ideas ?

regards,
Don
 

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