mysticmario
Active Member
- Joined
- Nov 10, 2021
- Messages
- 323
- Office Version
- 365
- Platform
- Windows
I have a master file that at some point saves some sheets into seperate file in OneDrive, the problem is that since 4 users have this OneDrive installed on their PC, each and everyone of us has different path to it.
So in order for my coleagues to be able to save the file I had to make a workaround which provided the path for each user.
wbaddress essentially has a path depending on user saving the file
e.g. For user 1:
for user 2:
etc
is there a way to simply reference default path?
for e.g
So in order for my coleagues to be able to save the file I had to make a workaround which provided the path for each user.
VBA Code:
wbnew.SaveAs Filename:=wbaddress & "\" & wbname2 & ".xlsm", _
FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
e.g. For user 1:
wbaddress = C:\Users\Projektant\OneDrive - ART-PRO Sp. z o.o\Quotations
for user 2:
wbaddress = C:\Users\artpr\OneDrive - ART-PRO Sp. z o.o\Documents\Quotations
etc
is there a way to simply reference default path?
for e.g
VBA Code:
wbnew.SaveAs Filename:=[thisfilepath] & "\" & "Quotations" & "\" & wbname2 & ".xlsm", _
FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False