Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

multiline in textbox

Status
Not open for further replies.

bobthenob

Electrical
Joined
Oct 21, 2006
Messages
1
Location
GB
hi i have only recently started visual basic
i seached through the posts this post(thread766-125113)
I thought would awnser my problem.
i have tick boxes that the user selects
heres the code for 2 of the tick boxes
Code:
Private Sub chk1_Click()
If chk1.Value = vbChecked Then
txt1.Text = "texthere " & Chr$(10) & Chr$(13)
ElseIf chk1.Value = vbUnchecked Then
txt1 = ""
End If
End Sub

Private Sub chk2_Click()
If chk2.Value = vbChecked Then
txt1.Text = "more text here " & Chr$(10) & Chr$(13)
ElseIf chk2.Value = vbUnchecked Then
txt1 = ""
End If
End Sub
i add the Chr$(10) & Chr$(13) and tryd vbCrLf
as i want each output to go on a sepertate line i have multiline on true
but it will only show 1 line or the other with
thanks any help would be apreceated
 
You probably have to also make the "Wrap Text" property "True" as well.
 
You might also want to check is there is a "multiline" proper for the edit box. If so, make that it's set to Yes.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top