View Single Post
 
Old 05-21-2009, 08:23 AM
Puffin617 Puffin617 is offline Windows XP Office 2003
Novice
 
Join Date: May 2009
Posts: 5
Puffin617 is on a distinguished road
Default

Hey,

NO-GO... Here is my code so far...

Code:
Private Sub CommandButton1_Click()

    'Application.ScreenUpdating = False
    
    SizeIncrease = TextBox1.Value
    
    If SizeIncrease = "" Then
        End
    End If
    
    Selection.Find.ClearFormatting        '<------Repeat from here

    With Selection.Find
        .Text = "*"
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindContinue
        .Format = True
        .MatchCase = False
        .MatchWholeWord = False
        .MatchWildcards = False
        .MatchSoundsLike = False
        .MatchAllWordForms = False
        .MatchWildcards = True
    End With

    If OptionButton1 = True Then
        While Selection.Find.Execute
            Selection.Font.Size = Selection.Font.Size + SizeIncrease
        Wend
    Else
        While Selection.Find.Execute
            Selection.Font.Size = Selection.Font.Size - SizeIncrease
        Wend
    End If

    'Application.ScreenUpdating = False
    
    frmChangeFontSize.Hide
        
End Sub
It just continues right past the end of the selection...

A thought : What does the ".wrap" in the find do?
Reply With Quote