UI Ribbon: How to unpress a toggle button?

Kamolga

Well-known Member
Joined
Jan 28, 2015
Messages
1,185
Hi,

I try to untoglgle a button after use. My xml code is

Capture.jpg
[/URL][/IMG]

and I tried this in VBA
Code:
Sub TbtnManClick(control As IRibbonControl, Pressed As Boolean)
Dim Manvalue As Variant
Manvalue = InputBox(Range("LgMan"), Range("LgMan"), Range("RngMan"))
Range("RngMan") = Manvalue

[COLOR=#ff0000]'Untoggle the button????[/COLOR]

returnedVal = False
  Pressed = False
End Sub

 
Sub GetPressed(control As IRibbonControl, ByRef returnedVal)
  returnedVal = False
  Pressed = False
End Sub

without success. Any hint?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
A toggle button naturally toggles itself. If you don't want that, why use one?
 
Upvote 0
Because I want a few simple gray ones below one another with a caption: I have words written on the ribbon to click, which in this case is more intuitive than icons. Basically I click "Date" and I have a calendar coming, or "Manager" and have an input box to put his/her name. All those have been set up through userforms at opening of template and the ribbon allow to change specific parts of the form that we could want to update without going through them all again.

But by the way, it would be nice if they were toggled/pressed if the cell where input is made is empty so that we could easily spot the data that requires input. That would be easily set up if I understood how to change this status.:mad:
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,837
Messages
6,121,883
Members
449,057
Latest member
Moo4247

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top