Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-01-2016, 11:57 AM
jpl jpl is offline Trying to change Regular to Superscript and vice versa Windows 7 64bit Trying to change Regular to Superscript and vice versa Office 2010 32bit
Advanced Beginner
 
Join Date: Jan 2016
Location: France
Posts: 33
jpl is on a distinguished road
Default

Peut être une solution :
Code:
Sub essai()
    Dim c As Range
    For Each c In Selection.Characters
        With c.Font
            If .Superscript = True Then
                .Superscript = False
            ElseIf .Superscript = False And .Subscript = False Then
                .Superscript = True
            End If
        End With
    Next c
End Sub

Reply With Quote
  #2  
Old 07-01-2016, 12:13 PM
jpl jpl is offline Trying to change Regular to Superscript and vice versa Windows 7 64bit Trying to change Regular to Superscript and vice versa Office 2010 32bit
Advanced Beginner
 
Join Date: Jan 2016
Location: France
Posts: 33
jpl is on a distinguished road
Default

There is a clumsiness in my code: we can delete(eliminate) the condition .Superscript = false
Reply With Quote
  #3  
Old 07-01-2016, 04:40 PM
wardw wardw is offline Trying to change Regular to Superscript and vice versa Windows 7 64bit Trying to change Regular to Superscript and vice versa Office 2007
Advanced Beginner
Trying to change Regular to Superscript and vice versa
 
Join Date: Oct 2012
Posts: 65
wardw is on a distinguished road
Default

Thanks so much, JPL; this worked fine for my purposes.
Reply With Quote
Reply

Tags
convert regular font, convert superscript font



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to change Regular to Superscript and vice versa Sub/superscript hotkey danish keyboard Fakecake OneNote 1 04-05-2015 04:39 AM
excel update superscript by 1 htownpaper Word 8 12-08-2014 06:38 PM
Insert superscript into a textbox Deltaj Word VBA 3 11-30-2014 04:23 PM
Trying to change Regular to Superscript and vice versa Regular (roman) character style doesn't change text to roman kcbenson Word 2 10-16-2014 01:31 PM
Trying to change Regular to Superscript and vice versa Sizing cells to pics (or even vice versa?) Guloluseus Excel 1 07-27-2014 11:24 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:06 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