Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 12-04-2010, 01:33 AM
Kaneto Kaneto is offline Excel 2010 Custom Ribbon Windows 7 Excel 2010 Custom Ribbon Office 2010 (Version 14.0)
Competent Performer
 
Join Date: Nov 2010
Posts: 136
Kaneto is on a distinguished road
Default

The buttons for placing superscript and subscript on the custom ribbon aren't built-in, but you can create them pretty easily with VBA.

First, create a new workbook. You're going to want to save it in c:\users\[username]\AppData\Roaming\Microsoft\Excel\XLSTART. Name it personal.xlsb (an Excel binary workbook).

Next you'll need to access the Developer ribbon.
1. Click the File Menu and choose Options.
2. Click on Customize Ribbon.
3. In the right-hand pane, check the box next to Developer.
4. Click OK.

Now to create the macros.
1. Click on the Developer ribbon.
2. Click on Macros.
3. Enter a name for your macro in the Macro name: box (e.g. Superscript).
4. Click the Create button.
5. For Superscript, enter the following code into the VBA box:
Code:
Sub Superscript()
    With Selection.Font
        .Superscript = True
    End With
End Sub
6. Go back to the Excel window, and repeat steps 2-4 for the Subscript macro.
7. Enter the following code in the VBA box for subscript:
Code:
Sub Subscript()
    With Selection.Font
        .Subscript = True
    End With
End Sub
8. Close the VBA editor and save the Excel file (don't put anything in the cells unless you want them to appear in every new excel file).

Now to add the Quick Access buttons:
1. Click on the File menu and choose Options.
2. Click on Quick Access Toolbar.
3. In the Choose commands from: drop-down, pick Macros
4. Select your Superscript and Subscript macros and Add them.
5. Optional: Change the icons for your buttons by highlighting them in the right-hand pane and clicking the Modify button.
6. Click OK when you are done.

That should do it. Hope this helps.

-SW
Reply With Quote
 

Tags
ribbon, subscript, superscript



Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2010 view of cel missing isla Excel 2 09-27-2013 09:35 AM
Creating custom tabs for Word & Excel 2003 on a Windows 7 OS Skarab Office 1 07-05-2010 09:23 AM
Embedded Excel Spreadsheet in Word Loses Ribbon amoncur Word 0 07-03-2010 09:22 PM
Embedded Excel Graphs - Custom Formatting Cody Drawing and Graphics 0 07-02-2010 02:30 PM
Excel Error Loading Custom UI XML sumdumgai Office 1 05-10-2010 06:59 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:15 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft