Flashing button on Ribbon

bluewaterfree

New Member
Joined
Dec 6, 2020
Messages
20
Office Version
  1. 2019
Platform
  1. Windows
I understand how to make a cell flash with conditional formatting.

What I want to do is have a button on the ribbon flash if a cell value equals "PAST DUE".

I use Office RibbonX Editor to create a ribbon with custom icon jpegs.
Multiple worksheets in the workbook... In the Tasks worksheet, cell $D$1, the values can be "Caught Up" or "Past Due".

But I'm not always looking at the Tasks worksheet. Thus, in the ribbon, even when I am looking at another worksheet in the workbook, I want to create a "flashing button" to remind me if there's something past due.

Effectively, if Tasks Worksheet Cell $D$1 equals "PAST DUE" display a Flashing Button Icon somehow, else display the regular button.

Flashing is optional but desired... required in my solution is displaying different icons based on a cell value

Any thoughts on how to accomplish that?

Thanks
Mark
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Wow--that's an interesting problem! I don't have a solution, but maybe this commentary can help...

I would think you need 2 icons to effect a flash--maybe one with a grey background and black text "Current", and one with a red background and black text "Past Due!". You would name them "IconCurrent" and "IconPastDue"

Then you'd need two buttonIDs
Rich (BB code):
          <button id="customButton1a" label="Account Status" size="large" image="IconCurrent" getVisible="GetVisible" tag="1Due" />
          <button id="customButton1b" label="Account Status" size="large" image="IconPastDue" getVisible="GetVisible" tag="1Cur" />

Then you'd create your VBA ribbon callbacks using RefreshRibbon(Tag:="*Due") or RefreshRibbon(Tag:="*Cur")

Then fire your callback in a Worksheet_Change procedure
 
Upvote 0
I figured out how to do this.... thanks to Adding A Checkbox Control To Your Ribbon
I was able to learn from his code and evolve and figure it out. Thanks also to the previous responses because they got me on a track to find the answer.

The XML in Office RibbonX Editor
<button
id="customButtonAMT4a"
label="Task List"
size="large"
onAction="TaskRemindersRibbon"
image="calendaricon"
getVisible="TaskCheck01"/>

<button
id="customButtonAMT4b"
label="Past Due Tasks"
size="large"
onAction="TaskRemindersRibbon"
image="pastdueicon"
getVisible="TaskCheck02"/>

Two buttons... the trick is the getVisible feature... that calls a macro to determine whether the button is visible or not.

Macro TaskCheck01 and TaskCheck02... effectively toggle the buttons to be visible or not based on a accessing worksheet cell values.
 
Upvote 0

Forum statistics

Threads
1,223,713
Messages
6,174,038
Members
452,542
Latest member
Bricklin

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