Thread: Text Box
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Text Box

Following is one interpretation of what you asked for, but as you havn't
come back to Rick only a guess -

Sub test2()
' replace
ReplaceTBtext "Tom", "Dick"
End Sub

Sub ReplaceTBtext(sFind As String, sReplace As String)
Dim sOldText As String, sNewText As String
Dim ws As Worksheet
Dim tb As TextBox

For Each ws In ActiveWorkbook.Worksheets
For Each tb In ws.TextBoxes
sOldText = tb.Text
sNewText = Replace(sOldText, sFind, sReplace)
If sNewText < sOldText Then tb.Text = sNewText
Next
Next
End Sub

Regards,
Peter T

"Ed" wrote in message
...
How do I change a line or a word in several Text Boxes on a sheet and on
multiple sheets?

Thanks.


Ed