View Single Post
  #2  
Old May 25th, 2004, 03:36 PM
Shobha
external usenet poster
 
Posts: n/a
Default How can I insert text in a textbox automatically?

hi,

You should first set the property 'Enter Key Behavior' of text box to 'New Line in Field'.
Then use the following code to add the text at the end of a text box. 'vbNewLine' is VBA constants that adds new line.

Private Sub Command0_Click()
Text1 = Text1 & vbNewLine & vbNewLine & "your text"
End Sub

Shobha