+ Reply to Thread
Results 1 to 3 of 3

Short-Cut Key vs Ribbon Button Macro Activating

  1. #1
    Registered User
    Join Date
    11-12-2015
    Location
    South, US
    MS-Off Ver
    2010
    Posts
    5

    Short-Cut Key vs Ribbon Button Macro Activating

    I have a very strange problem in running a macro in Excel 2010 on my Windows 10 machine.

    This macro called "CreateHurstChart" can be activated from a button located on the Ribbon under the Design tab (Chart Tools) when I have HURST.xltm loaded in. The macro is found in the PERSONAL.XLSB file (hidden) that is stored in the c:\users\Smith\AppData\Roaming\Microsoft\Excel\XLSTART directory path.

    When I have HURST.xltm loaded and click on the button on the ribbon to run the macro, the VBA code does its thing and then pops open a Open File dialog window so that I can select a CSV file to load.

    Once I double-click the file, the Open File window closes, the data from the CSV is loaded into a sheet, and then the VBA code continues by working on the data and creating a chart.

    HOWEVER...

    I had gone directly into the Properties of the CreateHurstChart macro and assigned a Short-cut key combination CTRL-SHIFT-S.

    Thus, when I have HURST.xltm loaded, instead of clicking on the ribbon button as outlined above but instead using the Short-cut key combination, it goes through the motions as before up to where the Open File dialog pops up, I double-click the file to load, it loads it into a sheet, and then the VBA STOPS!

    It doesn't process the CSV data it just loaded.

    I cannot for the life of me figure out why it works fine using the ribbon button but stops after loading the CSV data using the Short-cut key combination.

    Any ideas?

    TIA

  2. #2
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: Short-Cut Key vs Ribbon Button Macro Activating

    Hmmm!

    This is strange, but I have seen macros triggered by Hot Keys fail before! (And not been able to work out why). But I an NO EXPERT!!!

    Have you tried using a different Short Cut Key?

    Have you tried running the macro from a button on your worksheet?

    Have you tried moving the macro to the workbook (rather than PERSONAL.xlsb)?

    Have you tried entering a "Stop" line in the code, then stepping through using F8?

    Try these few things, and see how you go!

    I hope this helps, please let me know!

    Regards,

    David


    - Please click on the *Add Reputation button at the bottom of helpful responses.

    Please mark your thread as SOLVED:
    - Click Thread Tools above your first post, select "Mark your thread as Solved".


  3. #3
    Registered User
    Join Date
    11-12-2015
    Location
    South, US
    MS-Off Ver
    2010
    Posts
    5

    Re: Short-Cut Key vs Ribbon Button Macro Activating

    Quote Originally Posted by David A Coop View Post
    Hmmm!

    This is strange, but I have seen macros triggered by Hot Keys fail before! (And not been able to work out why). But I an NO EXPERT!!!

    Have you tried using a different Short Cut Key?

    Have you tried running the macro from a button on your worksheet?

    Have you tried moving the macro to the workbook (rather than PERSONAL.xlsb)?

    Have you tried entering a "Stop" line in the code, then stepping through using F8?

    Try these few things, and see how you go!

    I hope this helps, please let me know!

    Regards,

    David


    - Please click on the *Add Reputation button at the bottom of helpful responses.

    Please mark your thread as SOLVED:
    - Click Thread Tools above your first post, select "Mark your thread as Solved".

    I tried a few with same problem.

    But then when I got to Cntl-T, one of the three letters not used in Excel (along with Q and L, which Q did not work), it works!

    Weird! Seems the short-key combination itself was affecting the script.

    Thanks for the suggestions.

+ 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] Activating Option Button
    By MikeMeerkat in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-08-2015, 04:40 AM
  2. Replies: 0
    Last Post: 07-10-2014, 10:17 AM
  3. Customize Ribbon (Add Button / Assign Macro) in Excel 2010
    By JMax in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-08-2012, 04:46 PM
  4. Assign a relative macro to a Ribbon Button
    By CaioToOn! in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-31-2011, 05:13 PM
  5. Assigning a macro to a custom button in 2007 ribbon
    By dcgrove in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-14-2009, 05:50 AM

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