Variation of Paul Leyten's Path Clipper thing.
splits a path up a path and shortens parts to make it shorter.
e.g.
c:\program files\blingblongblu\bah\bleh.exe
c:\program...\blingbl...\bah\bleh.exe
Inputs
path
Returns
shorten'd path
Rate Variation of Paul Leyten's Path Clipper thing.
(3(3 Vote))
Private Function ShortenPath(Path As String, MaxLen As Integer) As String
Dim bleh() As String
bleh = Split(Path, "\")
For x = 0 To UBound(bleh)
If Not x = UBound(bleh) Then
If Len(bleh(x)) > MaxLen Then
bleh(x) = Mid$(bleh(x), 1, MaxLen - 3) & "..."
End If
tmp = tmp & bleh(x) & "\"
Else
tmp = tmp & bleh(x)
End If
Next
ShortenPath = tmp
End Function
Variation of Paul Leyten's Path Clipper thing. Comments
No comments yet — be the first to post one!
Post a Comment