ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   date code (https://www.excelbanter.com/excel-programming/411981-date-code.html)

tkraju via OfficeKB.com

date code
 
How to tell a Textbox(on a userform) and the user to enter date value in
"dd/mm/yy" format.

--
Message posted via http://www.officekb.com


Tim Zych

date code
 
Dim v As Variant
Do
v = InputBox("Enter a date")
If StrPtr(v) = 0 Then Exit Sub
Loop While Not IsDate(v)
Me.TextBox1.Text = Format(v, "dd/mm/yy")


--
Tim Zych
www.higherdata.com
Compare data in worksheets and find differences with Workbook Compare
A free, powerful, flexible Excel utility

"tkraju via OfficeKB.com" <u16627@uwe wrote in message
news:85202c0024350@uwe...
How to tell a Textbox(on a userform) and the user to enter date value in
"dd/mm/yy" format.

--
Message posted via http://www.officekb.com




tkraju via OfficeKB.com

date code
 
Mr.Tim,
Can this code be used for a TextBox in A userform ?
Where are messages ? where to insert the code?

Tim Zych wrote:
Dim v As Variant
Do
v = InputBox("Enter a date")
If StrPtr(v) = 0 Then Exit Sub
Loop While Not IsDate(v)
Me.TextBox1.Text = Format(v, "dd/mm/yy")

How to tell a Textbox(on a userform) and the user to enter date value in
"dd/mm/yy" format.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200806/1


Tim Zych

date code
 
Check out:

http://www.contextures.com/xlUserForm01.html

--
Tim Zych
www.higherdata.com
Compare data in worksheets and find differences with Workbook Compare
A free, powerful, flexible Excel utility

"tkraju via OfficeKB.com" <u16627@uwe wrote in message
news:8521c019e1429@uwe...
Mr.Tim,
Can this code be used for a TextBox in A userform ?
Where are messages ? where to insert the code?

Tim Zych wrote:
Dim v As Variant
Do
v = InputBox("Enter a date")
If StrPtr(v) = 0 Then Exit Sub
Loop While Not IsDate(v)
Me.TextBox1.Text = Format(v, "dd/mm/yy")

How to tell a Textbox(on a userform) and the user to enter date value in
"dd/mm/yy" format.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200806/1




tkraju via OfficeKB.com

date code
 
this is not what I want.I want to enter date value in textbox directly in
dd/mm/yy format.Textbox has to accept the date value what I mean entering the
date value.
If I enter today's date as 05/06/08(means 5thJune2008) it should not be
converted into 6thMay2008.
No input box,entry directly in Textbox.
Tim Zych wrote:
Check out:

http://www.contextures.com/xlUserForm01.html

Mr.Tim,
Can this code be used for a TextBox in A userform ?

[quoted text clipped - 9 lines]
How to tell a Textbox(on a userform) and the user to enter date value in
"dd/mm/yy" format.


--
Message posted via http://www.officekb.com


Tim Zych

date code
 
Check out

http://www.cpearson.com/excel/newposte.htm

It will help you in constructing a post so that you have a better chance in
getting the response you are looking for.


--
Tim Zych
www.higherdata.com
Compare data in worksheets and find differences with Workbook Compare
A free, powerful, flexible Excel utility


"tkraju via OfficeKB.com" <u16627@uwe wrote in message
news:853aa5d4351ef@uwe...
this is not what I want.I want to enter date value in textbox directly in
dd/mm/yy format.Textbox has to accept the date value what I mean entering
the
date value.
If I enter today's date as 05/06/08(means 5thJune2008) it should not be
converted into 6thMay2008.
No input box,entry directly in Textbox.
Tim Zych wrote:
Check out:

http://www.contextures.com/xlUserForm01.html

Mr.Tim,
Can this code be used for a TextBox in A userform ?

[quoted text clipped - 9 lines]
How to tell a Textbox(on a userform) and the user to enter date value
in
"dd/mm/yy" format.


--
Message posted via http://www.officekb.com





All times are GMT +1. The time now is 03:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com