Hello everyone,

I am new to the group.

Need some expert help here.

I am having problem with changing the date using textbox and spin button.
The code that I use for the spin button is as follows:

Private Sub SpinButton1_SpinUp()
TextBox1.Text = Format(CDate(TextBox1.Text) + 30, "dd mmm yy")
End Sub

Private Sub SpinButton1_SpinDown()
TextBox1.Text = Format(CDate(TextBox1.Text) - 30, "dd mmm yy")
End Sub

This works well, only that the result is displayed as day, month, year instead of month, year only.
When I changed the code as below, the decrease is limited to Dec 2018 while the increase to Jan 2020. The spin button is linked to a cell with a data entry "Jan-19".

Private Sub SpinButton1_SpinUp()
TextBox1.Text = Format(CDate(TextBox1.Text) + 30, "mmm yy")
End Sub

Private Sub SpinButton1_SpinDown()
TextBox1.Text = Format(CDate(TextBox1.Text) - 30, "mmm yy")
End Sub


I have tried but to no avail to get the results that I want, which is:
1) result should be displayed in month, year format
2) the minimum and maximum value of the date for the spin button are Jan 2018 and Dec 2065 respectively.

Thank you in advance for your helps on this problem.

Lynn