+ Reply to Thread
Results 1 to 16 of 16

how to get value of dropdown on ribbon

  1. #1
    Forum Contributor
    Join Date
    12-25-2012
    Location
    gent,belgium
    MS-Off Ver
    Excel 2021
    Posts
    146

    how to get value of dropdown on ribbon

    Hi

    Now when i click on the button Knop1 on the worksheet1 i see in the message the value 0.
    What i want is that when i click on the button that i see the year in the message that came from the dropdownbox on the tab extra vergoeding.

    Now i have to active first the dropdown and when i click then on the button Knop 1

    how can i do that without first clicking on the dropdown
    Attached Files Attached Files

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: how to get value of dropdown on ribbon

    When you address the Ribbon you need the routines to address the ribbon.
    Take a look here and see if you can make it work for you.
    https://stackoverflow.com/questions/...-combo-box-etc
    I would have to go into the UI Custom Editor to check the ID you gave the dropdown etc etc, but since you wrote this you'll probable be able to figure it out
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,232

    Re: how to get value of dropdown on ribbon

    Try changing the DDjaar_getItemLabel procedure to:
    Please Login or Register  to view this content.
    Artik

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: how to get value of dropdown on ribbon

    @Artik: Nice one works here

  5. #5
    Forum Contributor
    Join Date
    12-25-2012
    Location
    gent,belgium
    MS-Off Ver
    Excel 2021
    Posts
    146

    Re: how to get value of dropdown on ribbon

    How could I always see the current month or 2 months before in a dropdown list with the names of the months

  6. #6
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: how to get value of dropdown on ribbon

    You configure it like you did the years or you adda another dropdwon form the Months

  7. #7
    Forum Contributor
    Join Date
    12-25-2012
    Location
    gent,belgium
    MS-Off Ver
    Excel 2021
    Posts
    146

    Re: how to get value of dropdown on ribbon

    how do i to that like i did for the years

  8. #8
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: how to get value of dropdown on ribbon

    Needs fine tuning but you can build on from here
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    12-25-2012
    Location
    gent,belgium
    MS-Off Ver
    Excel 2021
    Posts
    146

    Re: how to get value of dropdown on ribbon

    @Keebellah
    In the dropdown i want to see all the names of the month of the of the entire year.
    so i can control more than to moths befor the actual month

  10. #10
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,232

    Re: how to get value of dropdown on ribbon

    It took me a while to find the error in Keeballah's latest code. I found in the MMmaand_OnAction procedure.
    "My" proposal after corrections.

    Artik
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    12-25-2012
    Location
    gent,belgium
    MS-Off Ver
    Excel 2021
    Posts
    146

    Re: how to get value of dropdown on ribbon

    thx for the help

  12. #12
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: how to get value of dropdown on ribbon

    Using Art's file just corrected so that when you click the month you get the month's name in Dutch in case your language setting is not set to Dutch

  13. #13
    Forum Contributor
    Join Date
    12-25-2012
    Location
    gent,belgium
    MS-Off Ver
    Excel 2021
    Posts
    146

    Re: how to get value of dropdown on ribbon

    thx

    But how can i make when im programming the ribbon.
    Im not always to save and close and reopen the file

  14. #14
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: how to get value of dropdown on ribbon

    You don’t have to program them, they’re dynamic you just select the year and the month and you do whatever you need to do with the results, since it always shows the 12 months you will only have to add a check in your own VBA code that you do not select a month later than the current month when the selected year is the same as the current year

  15. #15
    Forum Contributor
    Join Date
    12-25-2012
    Location
    gent,belgium
    MS-Off Ver
    Excel 2021
    Posts
    146

    Re: how to get value of dropdown on ribbon

    thx
    Now ath the end of oktober thy will pay may additional fee of August
    Do i want to select 2 months before current month

    So i think i hade a sollution for to do that.
    I must test it later.
    Then i post the code

  16. #16
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: how to get value of dropdown on ribbon

    Let us know if it works. This you can code yourself that when the selected year is the current year and the date is lets say in the the last week you automatically include the previous month or soemthing like that.
    Without knowing exactly what you are doing it's just a guess

+ 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. Read value dropdown on ribbon
    By glda19 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-18-2023, 12:06 PM
  2. Ribbon for Clearing dropdown
    By gkswjdrms in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-13-2022, 08:48 AM
  3. [SOLVED] Create ribbon button with dropdown
    By ByteMarks in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-22-2020, 09:24 AM
  4. Ribbon Tab Dropdown VBA link with cell
    By ridwan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-20-2019, 02:53 PM
  5. A dropdown how to fill on ribbon
    By glda19 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-19-2018, 03:27 PM
  6. VBA / XML dropdown in ribbon
    By michiel soede in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-15-2015, 10:35 AM
  7. Excel Ribbon dropdown
    By VWood in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-15-2010, 12:07 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