-
This demonstrates Application.PathSeparator[VBA]Public Sub GetPaths(Optional LL As Long)
With ThisWorkbook
L = Len(.Name)
LL = Len(.FullName)
Base_Path = Left(.FullName, LL - L - 1) & Application.PathSeparator
ArchiveFiles_Path = Base_Path & "Archive Files" & Application.Separator
End With
End Sub[/VBA]
But you might want to use the .Path property of the workbook.[VBA]Sub GetPaths2()
Base_Path = ThisWorkbook.Path & Application.Separator
ArchiveFiles_Path = Base_Path & "Archive Files" & Application.Separator
End Sub
[/VBA]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules