ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Toggle Text button between two options code needed (https://www.excelbanter.com/excel-programming/439896-toggle-text-button-between-two-options-code-needed.html)

owlnevada

Toggle Text button between two options code needed
 
I've been attempting to add a toggle button to a custom ribbon menu group
called "Old Summary Fixes" on a "Summary Edits" tab. Not sure how to proceed
after reading up on the subject. I just want to put the text in either a yes
or no status as below. Here's what I have so far;

Sub TogglEncumb_click(Optional control As IRibbonControl)

Case No
Range("B36").Select
ActiveCell.FormulaR1C1 = "ENCUMBRANCE(S) : YES ( ) NO ( X )"

Case Yes
Range("B36").Select
ActiveCell.FormulaR1C1 = "ENCUMBRANCE(S) : YES ( X ) NO ( )"


End Sub

Is the the most elegant way to proceed using CASE or is there a better way?

Any help with links to a close example or with the .xlam modifications and
the above code would be very helpful.

Thanks in Advance.


All times are GMT +1. The time now is 03:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com