Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Friends,
I have been using the following function for Checking if the file exists. Public Function FileExists(ByVal sPathAndFileName$)as boolean FileExists = (Dir(sPathAndFileName)<"") End Function Today for the first time I found that the function worked if the filename part passed to the function matched the case of the file stored in the folder but did not work if the capitalization was not correct. I beleive that the Dir function is not case sensitive. What is happening then? Thanks. Alok |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
What was the exact full path of that file?
RBS "Alok" wrote in message oups.com... Friends, I have been using the following function for Checking if the file exists. Public Function FileExists(ByVal sPathAndFileName$)as boolean FileExists = (Dir(sPathAndFileName)<"") End Function Today for the first time I found that the function worked if the filename part passed to the function matched the case of the file stored in the folder but did not work if the capitalization was not correct. I beleive that the Dir function is not case sensitive. What is happening then? Thanks. Alok |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The file path and file name was
Z:\CMI\CMGWorksheet\MasterProtocolMultiV6.xls As I am writing this I am thinking whether it had something to do with drive mapping? Alok RB Smissaert wrote: What was the exact full path of that file? RBS "Alok" wrote in message oups.com... Friends, I have been using the following function for Checking if the file exists. Public Function FileExists(ByVal sPathAndFileName$)as boolean FileExists = (Dir(sPathAndFileName)<"") End Function Today for the first time I found that the function worked if the filename part passed to the function matched the case of the file stored in the folder but did not work if the capitalization was not correct. I beleive that the Dir function is not case sensitive. What is happening then? Thanks. Alok |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Offset function with nested match function not finding host ss. | Excel Worksheet Functions | |||
Emulate Index/Match combo function w/ VBA custom function | Excel Worksheet Functions | |||
Adding a custom function to the default excel function list | Excel Programming | |||
User-Defined Function pre-empting Built-in Function? How to undo???? | Excel Programming |