![]() |
|
#3
|
|||
|
|||
|
Hi, RobiNew! I would use a simplified variant of your code without any Ifs:
Code:
Sub BeforeCounterslash() Dim StrPath As String StrPath = "C:\Sub_1\Sub_2\Sub_3" StrPath = left(StrPath, InStrRev(StrPath, "\") - 1) MsgBox StrPath End Sub |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
PDF default path
|
hernans | Word VBA | 8 | 07-02-2018 06:06 PM |
| Critical path | bijukn1 | Project | 2 | 11-04-2016 10:31 AM |
Error with UNC path
|
Troy R | Mail Merge | 1 | 11-11-2015 09:06 AM |
Change old path to new path (batch)
|
NobodysPerfect | Word VBA | 2 | 08-14-2014 10:09 PM |
| Doc path | cinque8 | Word | 4 | 08-10-2012 06:57 PM |