Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating a date in a Text Box With A SpinButton 1

Status
Not open for further replies.

f64

Technical User
May 23, 2003
24
US
I am displaying a text box on a userform set to the current date in mm/dd/yyyy format. Is it possible to change the day in the text box with a spinbutton?
 
Yes!

Peace!! [peace]

Mike

Didn't get the answers that you wanted? Take a look at FAQ219-2884
 
For example:
Code:
Private Sub SpinButton1_SpinDown()
TextBox1 = DateSerial(Year(TextBox1), Month(TextBox1), Day(TextBox1) - 1)
End Sub

Private Sub SpinButton1_SpinUp()
TextBox1 = DateSerial(Year(TextBox1), Month(TextBox1), Day(TextBox1) + 1)
End Sub

Peace!! [peace]

Mike

Didn't get the answers that you wanted? Take a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top