Undo button information box text...

joe7894

New Member
Joined
Mar 6, 2013
Messages
18
Hi all,

I'm new to VBA & would like to use the MsgBox() function to display some of the data found in the information pop-up window when a user hovers the mouse over the undo button (e.g. Typing '=ABS(C3)' in C6).

I want to take this text to put it into something like this:

MsgBox("You just " & CODE_FOR_UNDO_TEXT & ".")

This will allow me to remind users of the last action they took.

Please ask for more details if my explanation is unclear.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Try:
Code:
Mid$(application.CommandBars(1).Controls("Edit").controls(1).caption, 6)
 
Last edited:
Upvote 0
The default caption for the Undo button (which was control 1 on the Edit menu) is the last action taken, but with "&Undo" at the start of it so I used Mid(..., 6) - note the code amendment to 6 from 5! - to skip the &Undo part from the beginning.
 
Upvote 0

Forum statistics

Threads
1,223,967
Messages
6,175,673
Members
452,666
Latest member
AllexDee

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