Reseting A Spreadsheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What VBA command is equivalent to pressing the "esc" key? Or what other code should I place at the end of a macro to "reset" the worksheet so that the menu bar buttons will show again?
 
Hi Paul

Please more information

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)




Paul said:
What VBA command is equivalent to pressing the "esc" key? Or what other code should I place at the end of a macro to "reset"
the worksheet so that the menu bar buttons will show again?
 
Ron,

sometimes when I run macros, while the macro has control of the worksheet, many of the buttons on my tool bar are grayed out so that they cannot be selected. Once the macro ends, those buttons usually reapper in full color indicating they can be selected.

Every now and then when I run a macro, control does not seem to be entirely restrored to the worksheet upon the macro finishing. HOWEVER, the moment I push the "esc" key, or left click my mouse, or perform a cut & paste, everything reverts back to normal and the toolbar buttons appear ready for selection. I was just wondering if I could put one last line in any macro that I experience this minor annoyance with to save me from having to perform the final keystroke manually.

Hope this helps,
Paul
 
Paul

You have some other issue which leads to the "non-restoration" at the end of
your macros.

That should be addressed first.

That said, if the Esc key restores, try this at end of macro.

SendKeys "{ESC}"

Gord Dibben Excel MVP
 
Back
Top