dgd1212
asked on
Change ThisWorkBook.Path direction
The code snippet below directs a new workbook to c:\tmp
If Dir(ThisWorkbook.Path & "\" & "new.xlsx") = "" Then
xBook.SaveAs Filename:=ThisWorkbook.Pat h & "\" & ThisWorkbook.Name & "_" & Format(Now(), "yyyymmdd_hhnnss") & ".xlsx", FileFormat:=xlOpenXMLWorkb ook, CreateBackup:=False
Else
xBook.SaveAs Filename:=ThisWorkbook.Pat h & "\" & "new.xlsx", FileFormat:=xlOpenXMLWorkb ook, CreateBackup:=False
End If
How would this be altered to go to D:\My Documents (windows environment)
And the equivalent in the MAC OS. I don't use MAC and not sure if there is a common directory for docs.
Thanks in advance for any suggestions
If Dir(ThisWorkbook.Path & "\" & "new.xlsx") = "" Then
xBook.SaveAs Filename:=ThisWorkbook.Pat
Else
xBook.SaveAs Filename:=ThisWorkbook.Pat
End If
How would this be altered to go to D:\My Documents (windows environment)
And the equivalent in the MAC OS. I don't use MAC and not sure if there is a common directory for docs.
Thanks in advance for any suggestions
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER