I have a spin button on a user form (called PieSpinButton1)
in the userform initialization routine, I set max mins and default values depending on a number of conditions
Also in the form control I have this procedure which does "something" when the spin button changes
however the initialization routine triggers the change procedure, which causes the change procedure to run. Can I stop this happening at userform initialization stage as it is causing problems
many thanks in advance
in the userform initialization routine, I set max mins and default values depending on a number of conditions
Also in the form control I have this procedure which does "something" when the spin button changes
Code:
Private Sub YearSpinButton2_Change()
If YearSpinButton2.Value > Year(Now) Then
YearSpinButton2.Value = Year(Now)
Else: End If
YearTextBox2.Value = YearSpinButton2.Value
Worksheets("Constants").Range("B18").Value = YearSpinButton2.Value
Refresh_Chart
End Sub
however the initialization routine triggers the change procedure, which causes the change procedure to run. Can I stop this happening at userform initialization stage as it is causing problems
many thanks in advance