Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Beginners
Date Format for Userform TextBox
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Bob Phillips, post: 3349075"] Private Sub TxtDate_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean) Dim sEntry As String Dim iLoc As Integer sEntry = Trim(Me.TxtDate.Value) iLoc = InStr(sEntry, "/") If iLoc > 0 Then Me.TxtDate.Value = Format(CDate(sEntry), "dd-mmm-yy") If Err <> 0 Then GoTo Had_Problem End If Exit Sub End If Had_Problem: MsgBox "Could not interpret your entry as a date in the format of d/m." & vbLf & "Please try again..." Cancel = True End Sub [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Beginners
Date Format for Userform TextBox
Top