Hi Michael,
the Application.Path-Property returns you a value like this:
e.g:
Z:\Folder\Subfolder\...\File.xlsm
abstract:
Driveletter : Folder\Subfolders\...\Filename.extension
First of all, regarding your example, you have to add the Application.PathSeparator constant like this:
ActiveWorkbook.SaveAs ActiveWorkbook.Path & Application.PathSeparator & "Pre-Alert AT\PPS AT" & Format(Now(), "YYYY-MM-DD") & ".xlsm" _ , FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False Many thanks in advance.
'you are also able to replace the Application.PathSeparator constant with Backslash-String... see below
ActiveWorkbook.SaveAs & "\" & "Pre-Alert AT\PPS AT" & Format(Now(), "YYYY-MM-DD") & ".xlsm" _ , FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False Many thanks in advance.
Anyway,
alternativ you are able to use an UNC-Path like this:
\\SERVER\CRG\High Value\ ....
Note:
If you use UNC-Path you have to ensure thta cleint will have security access allowed in office-options.
|