ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Dir( ) Problem (https://www.excelbanter.com/excel-programming/273990-dir-problem.html)

Donald Lloyd

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




All times are GMT +1. The time now is 03:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com