Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-05-2010, 07:22 PM
judicial85 judicial85 is offline Excel 2010 Custom Ribbon Windows 7 Excel 2010 Custom Ribbon Office 2010 (Version 14.0)
Advanced Beginner
Excel 2010 Custom Ribbon
 
Join Date: Nov 2010
Posts: 64
judicial85 is on a distinguished road
Default

Actually, do you have any ideas for improving this code? Right now, the code can make subscript or remove subscript on one click, but ONLY if you click on the WHOLE cell (i.e. A4, B2, etc). I'm wondering how to alter this so that I can highlight one or two things in a cell for subscripting (i.e. Ba2CuO3 - only the numbers, not the whole cell entry).

Bryan (sorry - I don't know where the code box button is here)


Sub Subscript()
If Selection.Font.Subscript = True Then
With Selection.Font
.Subscript = False
End With
Else
With Selection.Font
.Subscript = True
End With


End If
End Sub
Reply With Quote
Reply

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 07:56 AM.


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