+ Reply to Thread
Results 1 to 7 of 7

Macro to save file on any user's folder on the desktop

  1. #1
    Registered User
    Join Date
    12-21-2017
    Location
    India
    MS-Off Ver
    2010
    Posts
    24

    Post Macro to save file on any user's folder on the desktop

    Hello Excel Forum

    I want to save a workbook to a folder name "QWERTY" on any user's desktop.

    1. Can someone please help me with a macro which would create a folder named "QWERTY" on any user's desktop and not just mine.
    2. Save the Excel workbook with a name based on a cell reference in that workbook.
    3. Save the workbook in the "QWERTY" folder created above.

    I would appreciate if anyone could teach me how to get the above problem solved.

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Macro to save file on any user's folder on the desktop

    the following code will give you the path to any user's desktop.
    With this path, you can create any folder you want.
    Please Login or Register  to view this content.
    I found it in Reddit:
    https://www.reddit.com/r/excel/comme...sktop_via_vba/
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: Macro to save file on any user's folder on the desktop

    Hello,

    Please Login or Register  to view this content.
    Kind regards, Harry.

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Macro to save file on any user's folder on the desktop

    Something to start with.

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  5. #5
    Registered User
    Join Date
    12-21-2017
    Location
    India
    MS-Off Ver
    2010
    Posts
    24

    Re: Macro to save file on any user's folder on the desktop

    @Pierre - Thanks for the link. 👍

    @Harry - That worked like a charm. You rock bro 👌

    @bakerman2 - That was an excellent solution. Thanks bro 👌

    I appreciate the support showered by all 3 of you. Keep rocking.

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Macro to save file on any user's folder on the desktop

    Glad to help and thanks for rep+.

  7. #7
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: Macro to save file on any user's folder on the desktop

    It's a start, but definitely not a finish.
    Run the code twice.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] macro to copy from a closed workbook on a desktop folder and save specific amended sheet
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-16-2017, 08:56 AM
  2. [SOLVED] Forcing a file to save to any user's desktop
    By Herr Rommel in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 11-24-2016, 05:48 PM
  3. [SOLVED] Need dynamic file path to save on desktop regardless of user
    By reagan.kha in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-07-2015, 04:13 PM
  4. [SOLVED] VBA: Create a new folder on any users desktop and save the file as value in cell (A51)
    By nwb in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-24-2014, 11:02 PM
  5. How to make this Macro work for any user so they can save to their desktop
    By Hardup in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-25-2013, 07:56 AM
  6. [SOLVED] save as CSV file on desktop but in a 'New folder'
    By mike02 in forum Excel General
    Replies: 6
    Last Post: 08-15-2012, 05:25 PM
  7. [SOLVED] How would I save a text file to a folder on the users desktop without knowing the path?
    By 111StepsAhead in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-21-2012, 01:36 PM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1