Okay so the background is a bit of the following, I'm trying to edit 1 number by an incriment value of 1, while another number is also edited using a backwards calculation dependant upon the value of the first number being edited. The problem here is two-fold: first the number in the second column doesn't change unless I click 'run', and secondly, the number it keeps returning is wrong (I think it's just doing it the once).
The code I'm using is the following:
The first number, and the number the spinner is currently tied to is "D3", the second number that is supposed to change based on that value is M4. I also want to eventually tie a restriction that M4 cannot be less than zero for changes to occur in D3, but that might take a bit longer.![]()
Sub Spinner13_Change() End Sub Private Sub SpinButton13_SpinDown() Dim incrimentVal As Integer With Range("D3") Select Case Range("D3").Value Case Is < 10 incrimentVal = -1 Case Is < 12 incrimentVal = -2 Case Is < 15 incrimentVal = -3 Case Is < 17 incrimentVal = -4 Case Is < 100 End Select Range("M4") = Range("M4") + incrimentVal End With End Sub Private Sub SpinButton13_SpinUp() Dim incrimentVal As Integer With Range("D3") Select Case Range("D3").Value Case Is <= 10 incrimentVal = -1 Case Is <= 12 incrimentVal = -2 Case Is <= 15 incrimentVal = -3 Case Is <= 17 incrimentVal = -4 Case Is <= 100 End Select Range("M4") = Range("M4") + incrimentVal End With End Sub
The second code I have is trying to edit the minimum value of the spinbutton when the user clicks a checkbox (hence declaring they are done with this portion of the edit). The code I'm using is:
But it keeps returning 424 error. Any help with either of these things would be appreciated. Thanks. By the way.. if there is a list of functions that can be run in excel using VB that would be extremely helpful ^^![]()
Sub CheckBox12_Click() Spinbutton13.Min = Range("D3") End Sub
Bookmarks