Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format of a textbox on a user form controled by a spinner
I am trying to build a form with a date in a text box
controled by a spinner. I am able to place the spinner and the text box, but cannot make the format of a date show in the text box. All I can get is the number to show in the text box. i.e. 37872 is today. thanks in advance Jeff |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Format of a textbox on a user form controled by a spinner
Private Sub Spinner1_SpinUp()
Dim dDate as Date dDate = cDate(Textbox1.Text) dDate = dDate + 1 Textbox1.Text = Format(dDate,"mm/dd/yyyy") End Sub Private Sub Spinner1_SpinDown() Dim dDate as Date dDate = cDate(Textbox1.Text) dDate = dDate - 1 Textbox1.Text = Format(dDate,"mm/dd/yyyy") End Sub -- Regards, Tom Ogilvy Jeff wrote in message ... I am trying to build a form with a date in a text box controled by a spinner. I am able to place the spinner and the text box, but cannot make the format of a date show in the text box. All I can get is the number to show in the text box. i.e. 37872 is today. thanks in advance Jeff |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Date format changes when inputed from user form | Excel Discussion (Misc queries) | |||
Maximum number in Form Spinner Control ? | Excel Worksheet Functions | |||
visual basic user form date format dd/mm/yy not mm/dd/yy | Excel Discussion (Misc queries) | |||
User Form in VB = TextBox | Excel Discussion (Misc queries) | |||
User Form textbox formatting | Excel Programming |