Thread: Dir( ) Problem
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Donald Lloyd Donald Lloyd is offline
external usenet poster
 
Posts: 30
Default Dir( ) Problem

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