View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
K Dales[_2_] K Dales[_2_] is offline
external usenet poster
 
Posts: 1,163
Default delete from text box using command button

I have run across this; how to get at that text is pretty obscure from the
documentation and object browser! Here is the solution:
Sheet2.Shapes("Text Box 1").OLEFormat.Object.Text=""
--
- K Dales


"john tempest" wrote:

i am trying to write some code to clear a text box .the text box is from the
drawing toolbar. i have trid the following but to no avail:
Private Sub CommandButton3_Click()
With Sheet2.Shapes("Text Box 1").TextFrame
.Characters(.Characters.Count + 1).ClearContents
End With
End Sub
any suggestions
regards john