How could I make the spin button to spin up the date from TextBox1 to the date in TextBox2 only. And spin down the date from TextBox2 to TextBox1.
Following is the code I have now
Code: Select all
Private Sub SpinButton1_SpinDown()
TextBox1.Text = Format(CDate(TextBox1.Text) - _
CDate(SpinButton1.SmallChange), "dd/mm/yyyy")
End Sub
Private Sub SpinButton1_SpinUp()
TextBox1.Text = Format(CDate(TextBox1.Text) + _
CDate(SpinButton1.SmallChange), "dd/mm/yyyy")
End Sub