Home |
Search |
Today's Posts |
#16
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Agreed, but it will work only if the file exists on the user's machine. If
it's just a string- parsing exercise without real files (or with files on another machine), Dir will yield a blank. -- Vasant "Tushar Mehta" wrote in message news:MPG.1a9aaa7e4547571d9896ed@news-server... Nice! -- Regards, Tushar Mehta, MS MVP -- Excel www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article , says... Another way .. Sub TesterII() Dim str As String Dim xfile As String Dim xpath As String str = "D:\Development Path\Main Files\Test Procedures\Sample Data.mdb" xfile = Dir(str) xpath = Left(str, Len(str) - Len(xfile)) MsgBox xfile MsgBox xpath End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Concatenate path and file string for external reference | Excel Worksheet Functions | |||
Relative Path in Connection String | Excel Discussion (Misc queries) | |||
How to extract only file name from folder path string in Excel? | Excel Worksheet Functions | |||
Formula too long - new file path is shorter than old file path - Excel 2003 | Excel Worksheet Functions | |||
Using a variable string in a file save path | Excel Programming |