Consulting

Results 1 to 3 of 3

Thread: Ribbon toggleButtons Highlight and Un-Highlight

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Newbie
    Joined
    Jan 2024
    Posts
    2
    Location

    Question Ribbon toggleButtons Highlight and Un-Highlight

    I’m on probably 12 hours of trying to get this to work. Fingers crossed no one asks me to post what i have tried because i have tried and typed over a million times.

    I have a custom xml ribbon with four toggleButtons, when I click a toggleButton, it opens a form (in Access), I would like that button to stay highlighted. Then, when i click on another toggleButton, I want to highlight that one, and un-highlight all others. Is that possible?

    I have tried all scenarios of OnAction and getPressed and trying to invalidate the ribbon and i tried invalidating the control, and returnedVal, etc. I guess I’m not doing it in the correct order because they either all stay highlighted or none at all.

    I guess I’m not understanding the difference between OnAction (ie open the page i want) and getPressed (is that just capturing the state of the button on click)? I then come down to why would i even need getPressed? In theory, I want OnAction - turn the state of my current control to pressed = true, and all others False.

    I just cannot for the life of me figure out how. Please help!

  2. #2
    VBAX Newbie
    Joined
    Jan 2024
    Posts
    2
    Location
    Not sure this will post, i just tried and i got "denied"?? but I tried to post a copy of the code from Paul Hossler, maybe it didnt like that?

    I figured it out with Pauls code. I started from scratch to retrace my steps and realized i was passing another variable in the xml code and that was throwing the whole thing off.

  3. #3
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,234
    Location
    Glad you were able to work out an answer. Not sure what's going on with the forum lately. Another person was trying to post and they got denied initially as well.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

Posting Permissions

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