Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Change text in rectangle shape

If they are textboxes from the Drawing toolbar

Sub AABBCCDD()
Dim tbox As TextBox
For Each tbox In ActiveSheet.TextBoxes
If InStr(1, tbox.Text, "2006", vbTextCompare) Then
tbox.Text = Application.Substitute( _
tbox.Text, "2006", "2007")
End If
Next
End Sub

if they are textboxes from the control toolbox toolbar

Sub AACCDD()
Dim ol As OLEObject
Dim tbox As MSForms.TextBox
For Each ol In ActiveSheet.OLEObjects
If TypeOf ol.Object Is MSForms.TextBox Then
Set tbox = ol.Object
tbox.Text = Replace(tbox, "2006", "2007")
End If
Next
End Sub

--
Regards,
Tom Ogilvy
"Finance guy" wrote in message
...

How can I enumerate through all worksheets and rectangles and add a text
string to all textboxes all of them currently say ©2006 I need to
change
it to 2007.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rectangle shape round top corners only goss[_2_] Excel Discussion (Misc queries) 1 June 29th 09 03:10 AM
Change text in rectangle shape Carole O Excel Programming 0 January 23rd 07 12:36 AM
Change text in rectangle shape Don Guillett Excel Programming 0 January 22nd 07 11:54 PM
Changing text in a rectangle (shape) using a macro Adrian T[_4_] Excel Programming 4 September 29th 06 09:08 PM
Change Shape Text rhani111 Excel Worksheet Functions 2 July 14th 06 02:31 PM


All times are GMT +1. The time now is 10:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"