P
Provart
I have Userform, i need increment "i" with CommandButton4. This is my code,
Tnx for Help.
Private Sub CommandButton1_Click()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = TextBox1
.Forward = True
.Wrap = wdFindAskListBox
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
End Sub
Private Sub CommandButton2_Click()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = TextBox1
.Replacement.Text = TextBox2
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceOne
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = TextBox1
Selection.Find.Execute
End With
End Sub
Private Sub CommandButton3_Click()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = TextBox1
.Replacement.Text = TextBox2
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Private Sub CommandButton3_Click()
End Sub
Private Sub UserForm_Initialize()
Dim MyArray As Variant
Dim TyArray As Variant
MyArray = Array(" ", "([a-z])^13")
TyArray = Array(" ", "\1 ")
UserForm1.TextBox1() = MyArray(0 + i)
UserForm1.TextBox2() = TyArray(0 + i)
UserForm1.Show
End Sub
Tnx for Help.
Private Sub CommandButton1_Click()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = TextBox1
.Forward = True
.Wrap = wdFindAskListBox
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
End Sub
Private Sub CommandButton2_Click()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = TextBox1
.Replacement.Text = TextBox2
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceOne
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = TextBox1
Selection.Find.Execute
End With
End Sub
Private Sub CommandButton3_Click()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = TextBox1
.Replacement.Text = TextBox2
.Forward = True
.Wrap = wdFindAsk
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
Private Sub CommandButton3_Click()
End Sub
Private Sub UserForm_Initialize()
Dim MyArray As Variant
Dim TyArray As Variant
MyArray = Array(" ", "([a-z])^13")
TyArray = Array(" ", "\1 ")
UserForm1.TextBox1() = MyArray(0 + i)
UserForm1.TextBox2() = TyArray(0 + i)
UserForm1.Show
End Sub