I know how to get the last subfolder in a path (here below), but how do I get the whole path before the last counterslash? Thanks!
Code:
Sub BeforeCounterslash()
Dim StrText As String
StrText = Trim(Split("C:\Sub_1\Sub_2\Sub_3", "\")(3))
MsgBox StrText
End Sub