E
Ed
What do I have to add to the below code so that it changes all occurrances in
a text box as well as multiple text boxes?
Sub textbox()
Dim FromStr As String
Dim ToStr As String
Dim TB As textbox
Dim wks As Worksheet
FromStr = "703b"
ToStr = "800L"
Set wks = ActiveSheet
With wks
For Each TB In .TextBoxes
With TB
.Text = Replace(expression:=.Text, _
Find:=FromStr, _
Replace:=ToStr, _
Start:=1, _
Count:=1, _
compare:=vbTextCompare)
End With
Next TB
End With
End Sub
a text box as well as multiple text boxes?
Sub textbox()
Dim FromStr As String
Dim ToStr As String
Dim TB As textbox
Dim wks As Worksheet
FromStr = "703b"
ToStr = "800L"
Set wks = ActiveSheet
With wks
For Each TB In .TextBoxes
With TB
.Text = Replace(expression:=.Text, _
Find:=FromStr, _
Replace:=ToStr, _
Start:=1, _
Count:=1, _
compare:=vbTextCompare)
End With
Next TB
End With
End Sub