TextBox will not clear date???????????
Does that mean that neither TextBox37 or 38 have their own event code?
--
__________________________________
HTH
Bob
"Tdp" wrote in message
...
The codes I have are as follows:
To insert the dates in data sheet:
LastRow.Offset(1, 48).Value = TextBox36.Text
LastRow.Offset(1, 49).Value = TextBox37.Text
LastRow.Offset(1, 50).Value = TextBox38.Text
To look up data from data sheet:
Me.TextBox36.Value = Format(FoundCell.Offset(0, 48).Value, "dd-mmm-yy")
Me.TextBox37.Value = Format(FoundCell.Offset(0, 49).Value, "dd-mmm-yy")
Me.TextBox38.Value = Format(FoundCell.Offset(0, 50).Value, "dd-mmm-yy")
Else
Me.TextBox36.Value = ""
Me.TextBox37.Value = ""
Me.TextBox38.Value = ""
If you need more of the code let me know.
Thank you
--
Tdp
"Bob Phillips" wrote:
Do you have any code associated with the other textboxes?
--
__________________________________
HTH
Bob
"Tdp" wrote in message
...
THi,
I have a Textbox when entered a date, it adds 90 days and 120 days to
that
date and enteres these dates to two more textboxes.
The trouble I am having is when a date is entered in error in the first
Textbox I can not clear it. The cursor freezes. Any ideas?
The code I am using is as follows:
Private Sub TextBox36_BeforeUpdate(ByVal Cancel As
MSForms.ReturnBoolean)
TextBox36.Value = Format(TextBox36.Value, "dd-mmm-yy")
If IsDate(Me.TextBox36.Value) Then
Me.TextBox37.Value _
= Format(CDate(Me.TextBox36.Value) + 90, "dd-mmm-yy")
Me.TextBox38.Value _
= Format(CDate(Me.TextBox36.Value) + 120, "dd-mmm-yy")
Else
Beep
Cancel = True
End If
End Sub
Tdp
|