Thema Datum  Von Nutzer Rating
Antwort
22.10.2019 08:11:40 Michael
Solved
Blau Sava under "ActiveWorkbook.Path" and additional folder
22.10.2019 09:30:52 Mase
NotSolved
22.10.2019 09:32:36 Mase
NotSolved
22.10.2019 09:34:40 UweD
NotSolved

Ansicht des Beitrags:
Von:
Mase
Datum:
22.10.2019 09:30:52
Views:
790
Rating: Antwort:
  Ja
Thema:
Sava under "ActiveWorkbook.Path" and additional folder

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.


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
22.10.2019 08:11:40 Michael
Solved
Blau Sava under "ActiveWorkbook.Path" and additional folder
22.10.2019 09:30:52 Mase
NotSolved
22.10.2019 09:32:36 Mase
NotSolved
22.10.2019 09:34:40 UweD
NotSolved