Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date format changes when inputed from user form Lynz Excel Discussion (Misc queries) 16 December 13th 08 11:27 PM
Maximum number in Form Spinner Control ? Darrell Burnett Excel Worksheet Functions 3 March 5th 08 12:49 AM
visual basic user form date format dd/mm/yy not mm/dd/yy DarrenO Excel Discussion (Misc queries) 1 March 28th 07 01:56 AM
User Form in VB = TextBox Kel Excel Discussion (Misc queries) 1 August 11th 05 12:26 AM
User Form textbox formatting Neal[_2_] Excel Programming 0 August 20th 03 08:14 PM


All times are GMT +1. The time now is 01:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"