LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
Tdp Tdp is offline
external usenet poster
 
Posts: 74
Default TextBox will not clear date???????????

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date format textbox? Tdp Excel Discussion (Misc queries) 2 October 15th 08 08:11 PM
Date format of a textbox Tdp Excel Discussion (Misc queries) 7 October 14th 08 10:27 PM
Textbox date formatting capt Excel Discussion (Misc queries) 14 January 2nd 08 10:02 AM
Textbox date format. AOU Excel Discussion (Misc queries) 2 April 24th 07 02:28 PM
Date format textbox George Excel Discussion (Misc queries) 2 September 20th 06 09:09 PM


All times are GMT +1. The time now is 11:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"