Format of a textbox on a user form controled by a spinner

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

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
 
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
 
Back
Top