Consulting

Results 1 to 3 of 3

Thread: Set default folder for save dialog in Excel for Mac

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Regular
    Joined
    Jan 2023
    Location
    Belgium
    Posts
    6
    Location

    Set default folder for save dialog in Excel for Mac

    Hello,

    I have tried several solutions to set the save-file dialog default folder.
    None have worked on Mac Excel/VBA.

    Can anyone share some working code for Mac (Big Sur 11.7.2) Excel/VBA that I can use to set the default folder for a file-save dialog, before opening the file at the end of a hyperlink?

    Here is what I want:

    Sub SimpleExample()
        Dim Website As String
        Website = "https://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist.zip?24e1f8f75f24ff1735cadf130163f7d0" ' Hyperlink to follow
        <some code here to set the default save folder and hopefully indicate "Replace" for the dialog, without having to specify them manually>
        ActiveWorkbook.FollowHyperlink Address:=Website, NewWindow:=True 'Open Website
    End Sub
    Many thanks.

  2. #2
    VBAX Mentor
    Joined
    Nov 2022
    Location
    The Great Land
    Posts
    334
    Location
    How to attach file: Reading and Posting Messages (vbaexpress.com), click Go Advanced below post edit window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    VBAX Regular
    Joined
    Jan 2023
    Location
    Belgium
    Posts
    6
    Location
    Thanks June7.
    I finally implemented a "workaround" using AppleScript, which I call as an app from my VBA code.
    And, your link confirms this as a viable approach for similar challenges on the Mac, rather than trying to solve them purely in VBA for Mac, which is what I was attempting to do initially.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •