View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Programatically control a shapes TextBox

Public Sub copytext()
ActiveSheet.Textboxes("Text Box 2").Text = _
ActiveSheet.Textboxes("Text Box 1").Text
End Sub

--
Regards,
Tom Ogilvy


"Francis Brown" <Francis wrote in message
...
I Have two Text Boxes on a worksheet. They are using the default names.

Text
Box 1 and Text Box 2.
I wish to have a code module copy the text from box 1 to box 2.

I was trying code along the following lines but this does not work.

Public Sub copytext()
Dim copytext As String
copytext = ActiveSheet.Shapes("Text Box 1").Characters.Text
ActiveSheet.Shapes("Text Box 2").Characters.Text = copytext
End Sub

I'am using Excel 97

Any Help Much appreciated.