+ Reply to Thread
Results 1 to 4 of 4

Desktop shortcut to run excel macro

  1. #1
    Registered User
    Join Date
    12-17-2015
    Location
    Katy, TX
    MS-Off Ver
    2013
    Posts
    4

    Wink Desktop shortcut to run excel macro

    Not sure if this is even possible but I have a macro that is stored in my personal macro workbook (Personal.XLSB). This macro opens a file and checks a few things and does a little formatting and then I am good to start using it. I have a little icon for it it on my ribbon, that is where I usually launch it from.

    My only complaint is having to open up excel and choose a blank workbook before I can launch my macro. I considered changing the start up options but I like them the way they are except for this one file. I was wondering if I could launch a macro from a shortcut. I was able to create this shortcut, C:\Users\farrissf\AppData\Roaming\Microsoft\Excel\XLSTART\PERSONAL.XLSB, which once put in a shortcut and executed launches excel without a sheet and I can click my my icon on my ribbon and the file opens up and runs the macro.

    You would think that I would be satisfied with that, but i wondered if there is a way launch excel and run the macro with one shortcut. I tried VBscripting but I could not get the syntax right, now I am wanting to make this shortcut work.

    Here is what I have tried so far:
    C:\Users\farrissf\AppData\Roaming\Microsoft\Excel\XLSTART\PERSONAL.XLSB!module2.open_topas

    The macro is in module 2, the name of the sub is open_topas. Any ideas?
    Last edited by FARRISSF; 07-12-2021 at 01:06 PM. Reason: Marked as solved

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Desktop shortcut to run excel macro

    Hi there,

    Try opening the attached workbook from a Desktop shortcut and see if it does what you need - it uses the following code in the "ThisWorkbook" VBA CodeModule:

    Please Login or Register  to view this content.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    12-17-2015
    Location
    Katy, TX
    MS-Off Ver
    2013
    Posts
    4

    Re: Desktop shortcut to run excel macro

    That worked absolutely perfectly, not sure why I couldn't think of such a simple approach! Thank you so much!

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Desktop shortcut to run excel macro

    Hi again,

    Many thanks for your feedback and also for the Reputation increase - much appreciated!

    You're welcome - glad I was able to help.

    Best regards,

    Greg M

+ 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. Macro to Place Internet Shortcut on Desktop
    By knight1301 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-13-2017, 06:15 AM
  2. Macro to create desktop shortcut. Worked, but saved sheet as template, now not.
    By thecdnmole in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-20-2014, 10:18 AM
  3. Desktop shortcut folder for excel only
    By MIKEMOOSE in forum Excel General
    Replies: 4
    Last Post: 04-09-2014, 02:21 PM
  4. Create a shortcut to the desktop in a macro
    By morins in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-11-2007, 04:41 PM
  5. Desktop Shortcut to Specific Sheet in Excel
    By joe_ssi in forum Excel General
    Replies: 1
    Last Post: 08-11-2006, 01:15 PM
  6. Excel desktop shortcut to cmd button in worksheet
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-05-2006, 01:15 PM
  7. [SOLVED] Use a macro to create a desktop shortcut?
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-01-2006, 07:35 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