Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Mann Lee
 
Posts: n/a
Default How to make [toggling] shortcut keys to superscript and subscript, respectively?

We all know there are built-in shortcut keys for Font.underline
[CTRL+u], .italic [CTRL+i], .bold [CTRL+b]and corresponding toolbar
buttons in Excel.
They are toggling shortcut keys which even work during typing/editing
in a cell, which is very convenient.
I've been struggling to make such shortcut keys for superscript and
subscript, without success.
Would anyone kindly tell me how?
I am currently trying to learn EXCEL 2000 VBA and ACCESS 2000 VBA.
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

There are no built-in shortcuts for these. You could write your own UDF, but
this won't work in edit mode on a cell.
Maybe John Walkenbach's SuperSub add-in would be what you want.

Allows selecting text to Super or Sub.

http://www.j-walk.com/ss/excel/files/supersub.htm


--

HTH


RP
(remove nothere from the email address if mailing direct)


"Mann Lee" wrote in message
om...
We all know there are built-in shortcut keys for Font.underline
[CTRL+u], .italic [CTRL+i], .bold [CTRL+b]and corresponding toolbar
buttons in Excel.
They are toggling shortcut keys which even work during typing/editing
in a cell, which is very convenient.
I've been struggling to make such shortcut keys for superscript and
subscript, without success.
Would anyone kindly tell me how?
I am currently trying to learn EXCEL 2000 VBA and ACCESS 2000 VBA.



  #3   Report Post  
Jack Sons
 
Posts: n/a
Default

Bob,

Strange, because I know they exist in Word 2000. Why not in Excel 2000?
Can't they be "transplanted" from Word to Excel? I guess the same internal
program(language) is behind Word and Excel (VBA)?

Jack Sons
The Netherlands

"Bob Phillips" schreef in bericht
...
There are no built-in shortcuts for these. You could write your own UDF,

but
this won't work in edit mode on a cell.
Maybe John Walkenbach's SuperSub add-in would be what you want.

Allows selecting text to Super or Sub.

http://www.j-walk.com/ss/excel/files/supersub.htm


--

HTH


RP
(remove nothere from the email address if mailing direct)


"Mann Lee" wrote in message
om...
We all know there are built-in shortcut keys for Font.underline
[CTRL+u], .italic [CTRL+i], .bold [CTRL+b]and corresponding toolbar
buttons in Excel.
They are toggling shortcut keys which even work during typing/editing
in a cell, which is very convenient.
I've been struggling to make such shortcut keys for superscript and
subscript, without success.
Would anyone kindly tell me how?
I am currently trying to learn EXCEL 2000 VBA and ACCESS 2000 VBA.





  #4   Report Post  
Nick Hodge
 
Posts: n/a
Default

Jack

Not looked at shortcut keys recently, but these will do for your needs.
They can be assigned to shortcut keys of your choice via the
ToolsMacroMacros...Options... button

Sub ToggleStrikeThrough()
If ActiveCell.Font.Strikethrough = True Then
Selection.Font.Strikethrough = False
Exit Sub
End If
Selection.Font.Strikethrough = True
End Sub

Sub ToggleSuperScript()
If ActiveCell.Font.Superscript = True Then
Selection.Font.Superscript = False
Exit Sub
End If
Selection.Font.Superscript = True
End Sub

Sub ToggleSubScript()
If ActiveCell.Font.Subscript = True Then
Selection.Font.Subscript = False
Exit Sub
End If
Selection.Font.Subscript = True
End Sub


--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"Jack Sons" wrote in message
...
Bob,

Strange, because I know they exist in Word 2000. Why not in Excel 2000?
Can't they be "transplanted" from Word to Excel? I guess the same internal
program(language) is behind Word and Excel (VBA)?

Jack Sons
The Netherlands

"Bob Phillips" schreef in bericht
...
There are no built-in shortcuts for these. You could write your own UDF,

but
this won't work in edit mode on a cell.
Maybe John Walkenbach's SuperSub add-in would be what you want.

Allows selecting text to Super or Sub.

http://www.j-walk.com/ss/excel/files/supersub.htm


--

HTH


RP
(remove nothere from the email address if mailing direct)


"Mann Lee" wrote in message
om...
We all know there are built-in shortcut keys for Font.underline
[CTRL+u], .italic [CTRL+i], .bold [CTRL+b]and corresponding toolbar
buttons in Excel.
They are toggling shortcut keys which even work during typing/editing
in a cell, which is very convenient.
I've been struggling to make such shortcut keys for superscript and
subscript, without success.
Would anyone kindly tell me how?
I am currently trying to learn EXCEL 2000 VBA and ACCESS 2000 VBA.







  #5   Report Post  
Nick Hodge
 
Posts: n/a
Default

Reading back through the post, these also will not work in Edit mode. In
fact nothing will in VBA

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"Nick Hodge" wrote in message
...
Jack

Not looked at shortcut keys recently, but these will do for your needs.
They can be assigned to shortcut keys of your choice via the
ToolsMacroMacros...Options... button

Sub ToggleStrikeThrough()
If ActiveCell.Font.Strikethrough = True Then
Selection.Font.Strikethrough = False
Exit Sub
End If
Selection.Font.Strikethrough = True
End Sub

Sub ToggleSuperScript()
If ActiveCell.Font.Superscript = True Then
Selection.Font.Superscript = False
Exit Sub
End If
Selection.Font.Superscript = True
End Sub

Sub ToggleSubScript()
If ActiveCell.Font.Subscript = True Then
Selection.Font.Subscript = False
Exit Sub
End If
Selection.Font.Subscript = True
End Sub


--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"Jack Sons" wrote in message
...
Bob,

Strange, because I know they exist in Word 2000. Why not in Excel 2000?
Can't they be "transplanted" from Word to Excel? I guess the same
internal
program(language) is behind Word and Excel (VBA)?

Jack Sons
The Netherlands

"Bob Phillips" schreef in bericht
...
There are no built-in shortcuts for these. You could write your own UDF,

but
this won't work in edit mode on a cell.
Maybe John Walkenbach's SuperSub add-in would be what you want.

Allows selecting text to Super or Sub.

http://www.j-walk.com/ss/excel/files/supersub.htm


--

HTH


RP
(remove nothere from the email address if mailing direct)


"Mann Lee" wrote in message
om...
We all know there are built-in shortcut keys for Font.underline
[CTRL+u], .italic [CTRL+i], .bold [CTRL+b]and corresponding toolbar
buttons in Excel.
They are toggling shortcut keys which even work during typing/editing
in a cell, which is very convenient.
I've been struggling to make such shortcut keys for superscript and
subscript, without success.
Would anyone kindly tell me how?
I am currently trying to learn EXCEL 2000 VBA and ACCESS 2000 VBA.










  #6   Report Post  
Bob Phillips
 
Posts: n/a
Default

Jack,

That is because Word is a word processor, and super/subscripts are an
intrinsic element of those. It is not so with Excel, so I guess that the
developers didn't see to build that in.

The Office suite share a lot of components, dictionary, language settings
etc., but they also have a lot of differences, based upon the individual
object models, and to exploit the product objectives. And of course, whilst
some co-operation takes place in Redmond, there are separate development
teams.

As to VBA, this is not relevant, as it is just the macro language, it is not
what the code is developed in, that would be C++.

The big problem with macro solutions is that they cannot be invoked whilst
the cell is in edit-mode, so whilst you could select say one word in a three
word cell and underline it (Ctrl-U), you couldn't do the same to invoke a
superscript macro, it would be all or nothing. And I believe that in most
instance you only want to super/subscript part, such as CO2 only wants the 2
subscripted.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jack Sons" wrote in message
...
Bob,

Strange, because I know they exist in Word 2000. Why not in Excel 2000?
Can't they be "transplanted" from Word to Excel? I guess the same internal
program(language) is behind Word and Excel (VBA)?

Jack Sons
The Netherlands

"Bob Phillips" schreef in bericht
...
There are no built-in shortcuts for these. You could write your own UDF,

but
this won't work in edit mode on a cell.
Maybe John Walkenbach's SuperSub add-in would be what you want.

Allows selecting text to Super or Sub.

http://www.j-walk.com/ss/excel/files/supersub.htm


--

HTH


RP
(remove nothere from the email address if mailing direct)


"Mann Lee" wrote in message
om...
We all know there are built-in shortcut keys for Font.underline
[CTRL+u], .italic [CTRL+i], .bold [CTRL+b]and corresponding toolbar
buttons in Excel.
They are toggling shortcut keys which even work during typing/editing
in a cell, which is very convenient.
I've been struggling to make such shortcut keys for superscript and
subscript, without success.
Would anyone kindly tell me how?
I am currently trying to learn EXCEL 2000 VBA and ACCESS 2000 VBA.







  #7   Report Post  
Jack Sons
 
Posts: n/a
Default

Bob,

It is perfectly clear to me now, I think.
The C++ programmers did not build in the possibility of sub- or
superscriping a part of the cell content, so there it stops. We can't reach
the C++ stuff with VBA or in any other way (source code is not public
anyway).
Correct?

Jack.

"Bob Phillips" schreef in bericht
...
Jack,

That is because Word is a word processor, and super/subscripts are an
intrinsic element of those. It is not so with Excel, so I guess that the
developers didn't see to build that in.

The Office suite share a lot of components, dictionary, language settings
etc., but they also have a lot of differences, based upon the individual
object models, and to exploit the product objectives. And of course,

whilst
some co-operation takes place in Redmond, there are separate development
teams.

As to VBA, this is not relevant, as it is just the macro language, it is

not
what the code is developed in, that would be C++.

The big problem with macro solutions is that they cannot be invoked whilst
the cell is in edit-mode, so whilst you could select say one word in a

three
word cell and underline it (Ctrl-U), you couldn't do the same to invoke a
superscript macro, it would be all or nothing. And I believe that in most
instance you only want to super/subscript part, such as CO2 only wants the

2
subscripted.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jack Sons" wrote in message
...
Bob,

Strange, because I know they exist in Word 2000. Why not in Excel 2000?
Can't they be "transplanted" from Word to Excel? I guess the same

internal
program(language) is behind Word and Excel (VBA)?

Jack Sons
The Netherlands

"Bob Phillips" schreef in bericht
...
There are no built-in shortcuts for these. You could write your own

UDF,
but
this won't work in edit mode on a cell.
Maybe John Walkenbach's SuperSub add-in would be what you want.

Allows selecting text to Super or Sub.

http://www.j-walk.com/ss/excel/files/supersub.htm


--

HTH


RP
(remove nothere from the email address if mailing direct)


"Mann Lee" wrote in message
om...
We all know there are built-in shortcut keys for Font.underline
[CTRL+u], .italic [CTRL+i], .bold [CTRL+b]and corresponding toolbar
buttons in Excel.
They are toggling shortcut keys which even work during

typing/editing
in a cell, which is very convenient.
I've been struggling to make such shortcut keys for superscript and
subscript, without success.
Would anyone kindly tell me how?
I am currently trying to learn EXCEL 2000 VBA and ACCESS 2000 VBA.








  #8   Report Post  
Jack Sons
 
Posts: n/a
Default

Nick,

Thanks for the effort.

Jack.

"Nick Hodge" schreef in bericht
...
Reading back through the post, these also will not work in Edit mode. In
fact nothing will in VBA

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"Nick Hodge" wrote in message
...
Jack

Not looked at shortcut keys recently, but these will do for your needs.
They can be assigned to shortcut keys of your choice via the
ToolsMacroMacros...Options... button

Sub ToggleStrikeThrough()
If ActiveCell.Font.Strikethrough = True Then
Selection.Font.Strikethrough = False
Exit Sub
End If
Selection.Font.Strikethrough = True
End Sub

Sub ToggleSuperScript()
If ActiveCell.Font.Superscript = True Then
Selection.Font.Superscript = False
Exit Sub
End If
Selection.Font.Superscript = True
End Sub

Sub ToggleSubScript()
If ActiveCell.Font.Subscript = True Then
Selection.Font.Subscript = False
Exit Sub
End If
Selection.Font.Subscript = True
End Sub


--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"Jack Sons" wrote in message
...
Bob,

Strange, because I know they exist in Word 2000. Why not in Excel 2000?
Can't they be "transplanted" from Word to Excel? I guess the same
internal
program(language) is behind Word and Excel (VBA)?

Jack Sons
The Netherlands

"Bob Phillips" schreef in bericht
...
There are no built-in shortcuts for these. You could write your own

UDF,
but
this won't work in edit mode on a cell.
Maybe John Walkenbach's SuperSub add-in would be what you want.

Allows selecting text to Super or Sub.

http://www.j-walk.com/ss/excel/files/supersub.htm


--

HTH


RP
(remove nothere from the email address if mailing direct)


"Mann Lee" wrote in message
om...
We all know there are built-in shortcut keys for Font.underline
[CTRL+u], .italic [CTRL+i], .bold [CTRL+b]and corresponding toolbar
buttons in Excel.
They are toggling shortcut keys which even work during

typing/editing
in a cell, which is very convenient.
I've been struggling to make such shortcut keys for superscript and
subscript, without success.
Would anyone kindly tell me how?
I am currently trying to learn EXCEL 2000 VBA and ACCESS 2000 VBA.










  #9   Report Post  
Bob Phillips
 
Posts: n/a
Default

Jack,

That's about it, although I wouldn't say they didn't build in the
possibility (as I have no idea), just they that didn't build it in. They may
build it one day, but to get a true shortcut driven facility, I think it
needs MS to do it.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jack Sons" wrote in message
...
Bob,

It is perfectly clear to me now, I think.
The C++ programmers did not build in the possibility of sub- or
superscriping a part of the cell content, so there it stops. We can't

reach
the C++ stuff with VBA or in any other way (source code is not public
anyway).
Correct?

Jack.

"Bob Phillips" schreef in bericht
...
Jack,

That is because Word is a word processor, and super/subscripts are an
intrinsic element of those. It is not so with Excel, so I guess that the
developers didn't see to build that in.

The Office suite share a lot of components, dictionary, language

settings
etc., but they also have a lot of differences, based upon the individual
object models, and to exploit the product objectives. And of course,

whilst
some co-operation takes place in Redmond, there are separate development
teams.

As to VBA, this is not relevant, as it is just the macro language, it is

not
what the code is developed in, that would be C++.

The big problem with macro solutions is that they cannot be invoked

whilst
the cell is in edit-mode, so whilst you could select say one word in a

three
word cell and underline it (Ctrl-U), you couldn't do the same to invoke

a
superscript macro, it would be all or nothing. And I believe that in

most
instance you only want to super/subscript part, such as CO2 only wants

the
2
subscripted.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jack Sons" wrote in message
...
Bob,

Strange, because I know they exist in Word 2000. Why not in Excel

2000?
Can't they be "transplanted" from Word to Excel? I guess the same

internal
program(language) is behind Word and Excel (VBA)?

Jack Sons
The Netherlands

"Bob Phillips" schreef in bericht
...
There are no built-in shortcuts for these. You could write your own

UDF,
but
this won't work in edit mode on a cell.
Maybe John Walkenbach's SuperSub add-in would be what you want.

Allows selecting text to Super or Sub.

http://www.j-walk.com/ss/excel/files/supersub.htm


--

HTH


RP
(remove nothere from the email address if mailing direct)


"Mann Lee" wrote in message
om...
We all know there are built-in shortcut keys for Font.underline
[CTRL+u], .italic [CTRL+i], .bold [CTRL+b]and corresponding

toolbar
buttons in Excel.
They are toggling shortcut keys which even work during

typing/editing
in a cell, which is very convenient.
I've been struggling to make such shortcut keys for superscript

and
subscript, without success.
Would anyone kindly tell me how?
I am currently trying to learn EXCEL 2000 VBA and ACCESS 2000 VBA.










Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple font styles (superscript and subscript, for example) Lorraine Charts and Charting in Excel 0 January 13th 05 07:45 PM
What happened to Subscript and Superscript Buttons in Excel? Patrick Charts and Charting in Excel 0 January 12th 05 04:33 PM


All times are GMT +1. The time now is 01:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"