Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I’d like a way to flesh out a file’s path the way the Dir() function
does. The Dir() function (like the DIR command in DOS) fills in missing components depending on what the current Path is set to. Suppose the current Path is C:\BigFolder Then all of the following Dir(“SubFolder\myfile.xls”) Dir(“C:SubFolder\myfile.xls”) Dir(“C:\BigFolder\SubFolder\myfile.xls”) ...will be treated as attempts to find this file: C:\BigFolder\SubFolder\myfile.xls If the User enters any one of the above strings, I’d like to tell them: You are trying to access C:\BigFolder\SubFolder\myfile.xls And if they just enter the string “OtherFile.xls”, I’d like to respond with: You are trying to access C:\BigFolder\OtherFile.xls ...etc. I’d like to be able to make the responses WHETHER THE FILE EXISTS OR NOT, so that if the file does NOT exist, my error message can include the whole attempted path. Is there some easy way I haven’t thought of to do this? I’m guessing you’d have to treat all these cases separately. Or does someone have an already-written routine that would do this? Dan Williams danwPlanet |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Missing fill handle | Excel Discussion (Misc queries) | |||
Fill-in missing information below | Excel Discussion (Misc queries) | |||
FILL COLOR BOX MISSING | Excel Discussion (Misc queries) | |||
Fill in missing months | Excel Discussion (Misc queries) | |||
Missing WrapText from range object in Office Web Components | Excel Programming |