Hello
can i Format TextBox to Appear with date Format
to show the user
/ /
and don't accept any kind of data Just date
Hello
can i Format TextBox to Appear with date Format
to show the user
/ /
and don't accept any kind of data Just date
this Picture Declare what i mean
This is incredibly convoluted, you have to parse what has been input previously, chcek what is entered, handle a delete, handle a backspace and so on. Far simpler to have three dropdowns in my view where they choose a year,. a month and a day.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
i see that xld
thanx for your suggestion
but can i make just the date inter in my textbox
i mean when any one try to write normal number excel refused it
You could check it on AfterUpdate as
[vba]
Private Sub TextBox1_AfterUpdate()
With Me.TextBox1
If Not IsDate(.Text) Then
MsgBox "Error"
.SelStart = 0
.SelLength = Len(.Text)
.SetFocus
End If
End With
End Sub
[/vba]
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
can i ask u xld, please
what we mean by
[VBA] .SelStart = 0
.SelLength = Len(.Text)
[/VBA]
What that does it to reselect all of the text from character one, this is when it errors so that the users attention is drawn to the bad data.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber