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?
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!!
Mike
Didn't get the answers that you wanted? Take a look at FAQ219-2884
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.