+ Reply to Thread
Results 1 to 8 of 8

Clicking a ribbon button with VBA?

  1. #1
    Forum Contributor
    Join Date
    08-25-2014
    Location
    Pennsylvania, US
    MS-Off Ver
    Windows '16
    Posts
    165

    Clicking a ribbon button with VBA?

    Is it possible to access a tab on the ribbon and click a certain button? I have an add-on in Excel which I would like to call, but do not know how to do it directly with VBA, is it possible to perform the equivalent of clicking a certain button on the ribbon with vba?

    Thanks

  2. #2
    Forum Contributor
    Join Date
    12-05-2015
    Location
    Akron, OH
    MS-Off Ver
    15.0
    Posts
    424

    Re: Clicking a ribbon button with VBA?

    JYTS,

    I'm guessing yes; but I'm not experienced enough to guide you how. Have you attempted to record a macro, click the certain button on the ribbon and view the code that is generated? If that works, please post the code that did it because I'd like to see it.

    Here is something I found really quickly that may point you towards the correct methods and objects you'll need to play with to approach your solution, even though this does not directly address the problem you'd like to solve:
    Taken from an msdn.microsoft website:

    https://social.msdn.microsoft.com/Fo...s?forum=isvvba

  3. #3
    Forum Contributor
    Join Date
    08-25-2014
    Location
    Pennsylvania, US
    MS-Off Ver
    Windows '16
    Posts
    165

    Re: Clicking a ribbon button with VBA?

    Recording a macro does not work. I'll look at the link....

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Clicking a ribbon button with VBA?

    What button are you looking to click?
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Forum Contributor
    Join Date
    08-25-2014
    Location
    Pennsylvania, US
    MS-Off Ver
    Windows '16
    Posts
    165
    Quote Originally Posted by shg View Post
    What button are you looking to click?
    I'm trying to click a refresh workbook in the FactSet tab.

  6. #6
    Forum Contributor
    Join Date
    12-05-2015
    Location
    Akron, OH
    MS-Off Ver
    15.0
    Posts
    424

    Re: Clicking a ribbon button with VBA?

    Does that do something more than the following?
    Please Login or Register  to view this content.

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Clicking a ribbon button with VBA?

    Refresh what? A query table??

    What button?

  8. #8
    Forum Contributor
    Join Date
    08-25-2014
    Location
    Pennsylvania, US
    MS-Off Ver
    Windows '16
    Posts
    165

    Re: Clicking a ribbon button with VBA?

    Hi and sorry for the delay. It is a button on an add-on called Factset, and the button is labeled "Refresh." It is not a query table, it is a button on an add-on in the ribbon. It can be reached with Alt+S+R+W if that helps .... (maybe I'll look into pressing keys with VBA and see if that is possible.....)

+ 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] Created add-in - how to get it on ribbon with button
    By D_N_L in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-02-2014, 12:29 PM
  2. [SOLVED] Addin W/ Ribbon: Restict Users from clicking buttons from wrong sheet.
    By sud123 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-12-2013, 05:33 PM
  3. [SOLVED] Run Logon button under custom ribbon tab using VBA
    By v2k2apj in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-22-2013, 04:09 PM
  4. [SOLVED] How do I run the macro for a button click without clicking the button?
    By flyboy54 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-12-2012, 10:45 AM
  5. Populate dropDown in a custom ribbon on clicking a button
    By johnjacobt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-01-2011, 05:02 AM
  6. How can i add a button to existing ribbon
    By J.wills in forum Outlook Programming / VBA / Macros
    Replies: 1
    Last Post: 03-30-2009, 02:41 AM
  7. How to create command button and run from the ribbon?
    By Nelson Li in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-18-2009, 01:57 PM

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