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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vbCrLF

Status
Not open for further replies.

ngagne

Technical User
Sep 14, 2001
323
US
Trying to put a Time/Date stamp string into a box. When the appropriate button is clicked, it should put the stamp onto a new line. Here's what I have:

Private Sub cmdTimeDatePD_Click()
If txtProblemDescription.Text = "" Then
txtProblemDescription.Text = Date + Time
Else
txtProblemDescription.Text = txtProblemDescription.Text + vbCrLf & Date + Time
End Sub

Here's the output after implementing the command several times:

||9/14/2001 11:01:15 AM||9/14/2001 11:01:16 AM

Not

9/14/2001 11:01:15 AM
9/14/2001 11:01:16 AM

What am I doing wrong?
 
Set the 'Multiline' property to True on the text box.
:)
 
Duh!!!!

I overlooked that. Thanks!
 
Also, change:

"Date + Time"

to

"Now"


MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top