Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
My thanks to Chip Pearson and Bob Phillips for their informed replies to my recent query re worksheet tabs - they made life a lot easier. Another, if you don't mind. I wish to check the current directory for the existence of an user entered filename. What's the simplest way of doing thias - I would rather not invoke the SaveAs dialog box. regards, Don Lloyd -- |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Donald,
Use the Dir function to determine if the file exists. E.g., Dim FName As String FName = InputBox("Enter a file name") If FName < "" Then If Dir(FName) < "" Then MsgBox "File Exists" Else MsgBox "File does not exist" End If Else MsgBox "You didn't enter a file name" End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Donald Lloyd" wrote in message ... Hi, My thanks to Chip Pearson and Bob Phillips for their informed replies to my recent query re worksheet tabs - they made life a lot easier. Another, if you don't mind. I wish to check the current directory for the existence of an user entered filename. What's the simplest way of doing thias - I would rather not invoke the SaveAs dialog box. regards, Don Lloyd -- |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you chip.
Excellent - almost a one-liner! Thanks and regards, Don -- "Chip Pearson" wrote in message ... Donald, Use the Dir function to determine if the file exists. E.g., Dim FName As String FName = InputBox("Enter a file name") If FName < "" Then If Dir(FName) < "" Then MsgBox "File Exists" Else MsgBox "File does not exist" End If Else MsgBox "You didn't enter a file name" End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Donald Lloyd" wrote in message ... Hi, My thanks to Chip Pearson and Bob Phillips for their informed replies to my recent query re worksheet tabs - they made life a lot easier. Another, if you don't mind. I wish to check the current directory for the existence of an user entered filename. What's the simplest way of doing thias - I would rather not invoke the SaveAs dialog box. regards, Don Lloyd -- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
File integrity checking? | Excel Discussion (Misc queries) | |||
Checking to see if a file exists. | Excel Discussion (Misc queries) | |||
Spell Checking with checking cell notes | Excel Discussion (Misc queries) | |||
file size & error checking | Excel Discussion (Misc queries) | |||
Add checking | Excel Worksheet Functions |