Q: Parsing the drive
firstname.lastname@example.org; AugustWind wrote: I am using a Dir list box & a File list box. When I click on the file, I am putting the path in a text box. However, I do NOT want the drive letter. If the path is c:\sub\sub\file.doc, I want it to show sub\sub\file.doc.
How do you parse just the drive letter & slash mark out of the path?
A: Function ParseDrive(source) As String Dim p% ParseDrive = source For p% = 1 To Len(source) If Mid$(source, p%, 1) = ":" Then ParseDrive = Right$(source, Len(source) - p%) Exit Function End If Next p% End Function use as MsgBox ParseDrive("c:\data\testing") give you "\data\testing\" Return