![]() |
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 |
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 |
All times are GMT +1. The time now is 01:56 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com