Public Function SeparateDriveAndPath( _ ByRef rDrive As Variant _ , ByRef rPath As Variant _ , ByVal vPath As Variant _ ) As Boolean
vPath rDrive rPath --------------------- --------------- ------------- C:\ C: \ C:\Temp C: \Temp C:\Temp\Win.Tmp C: \Temp\Win.Tmp \\SJS4\C\Temp\Win.Tmp \\SJS4\C \Temp\Win.Tmp \\SJS4\Entisoft \\SJS4\Entisoft \\SJS4\Entisoft\ \\SJS4\Entisoft \ \\SJS4\Entisoft\Tools \\SJS4\Entisoft \ToolsExample:
Assuming Dim strDrive As String Dim strPath As String for example SeparateDriveAndPath(strDrive, strPath, "\\SJS4\Entisoft\Tools") = True leaves strDrive = "\\SJS4\Entisoft" strPath = "\Tools"See also:
SeparatePathAndFile Function SeparatePrefixAndExtension Function CombineDriveAndPath FunctionrDrive: String or Variant that will receive the drive portion of vPath.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.