Custom Right-click cell menu

Formula11

Active Member
Joined
Mar 1, 2005
Messages
440
Office Version
  1. 365
Platform
  1. Windows
See link below for example of custom right-click cell menu.
Add Button To Cell Right-Click Menu Excel VBA Macro

Is it possible when alternately selecting a command button to:
- Alternately change the caption as shown below.
- Alternately run one of two macros, macro "A" or macro "B".

1706796364894.png
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
I think it would be better to just run A when wb opens then set a module level integer variable to 1.
When menu function is called, that function would check the Modulus of i (i Mod 2). If it returns 1, i is odd so call B. If it returns 0, i is even so call A. In A and B, increment i (i+1) when it runs.
 
Upvote 0
Thanks Micron, was going to use a similar logic, but the issue is changing the caption between Selected/Un-Selected.
 
Upvote 0

Forum statistics

Threads
1,215,129
Messages
6,123,218
Members
449,091
Latest member
jeremy_bp001

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