View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Subscripts and superscripts

Here is my take on what you are wanting to do. In a standard code module
(same place your recorded macro landed paste the following code

Public Sub ConvertToSuperScript()
With Selection.Font
.Superscript = Not .Superscript
End With
End Sub

Public Sub ConvertToSubScript()
With Selection.Font
.Subscript = Not .Subscript
End With
End Sub

go back to XL and select Macro - Macros...
Select one of the tow macros and then hit the options button. Define the
keyboard shortcut key. Do the same for the other macro in the list.

The macros will toggle back and forth between Super / Sub and regular script.
--
HTH...

Jim Thomlinson


"Scott" wrote:

I believe that a limitation to macro recording within Excel disables a user
from ending a macro recording when a menu is open.

I know there are no keyboard shortcuts for subscripts and superscripts
within Excel, as there are for Word.

As an attempt to work around the limitations, I began a macro and oped the
Format Cells dialogue box, and displayed the tab that shows the supscript and
superscript commands. I attempted to stop the macro but could not because the
menu was open.

Does anyone have a way to get around this, or have a macro/program that will
allow a user to create a keyboard shortcut for subscripts and superscripts?

I rely on these two commands heavily for work and it is a constant nag to
have to open and close the menu.

Thanks in advance for anyone's help.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...el.programming