![]() |
#2
|
|||
|
|||
![]()
This one works OK, but is there a simpler method? Thanks!
Code:
Sub TestNew() Dim StrPath As String, t As Long StrPath = "C:\Sub_1\Sub_2\Sub_3" If Right(StrPath, 1) = "\" Then StrPath = Left(StrPath, Len(StrPath) - 1) t = InStrRev(StrPath, "\") StrPath = Left(StrPath, t - 1) MsgBox StrPath End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
hernans | Word VBA | 8 | 07-02-2018 06:06 PM |
Critical path | bijukn1 | Project | 2 | 11-04-2016 10:31 AM |
![]() |
Troy R | Mail Merge | 1 | 11-11-2015 09:06 AM |
![]() |
NobodysPerfect | Word VBA | 2 | 08-14-2014 10:09 PM |
Doc path | cinque8 | Word | 4 | 08-10-2012 06:57 PM |