Using Excel 2003. Windows 7.
My Problem:
On my sheet, I have a cell that the user can increment with a scroll bar by 1-point at a time up or down, minimum of 0, maximum of 99, starts at 1. The scroll bar outputs to, lets say cell B1. Cell C1 has a dynamic number that cannot be exceeded. B1 has Data Validation that says that cell cannot be greater than cell C1, nor less than 0.
When the user types in the number in cell B1 manually, Data Validation works dandy, giving an error message if the number is greater than cell C1, however when the user uses the scroll bar to increment the number, data validation fails to give the error message.
I've spent about 1-hour on google trying to find an answer to this, but for some really strange reason, I seem to be the only person in the world to have discovered this problem... So unless there is a way to alter the way the scroll bar works, I'm pretty sure I have to do this with VBA.
BTW, I might be using a spinner instead of a scroll bar, but am having difficulty figuring out which one it is just by looking at it, and right-clicking it does not tell me what it is, nor does pressing F5 on it (oh how I miss my Visual Studio at times like this).
EDIT: Derp, it's a spinner. I opened it to edit its macro and it's called Spinner286. So I have 30 spinner's and plan on using this code with each one, problem is, I'm not sure how to address the spinner with the "With" command, i.e. do I call it SpinButton286, or Spinner286?
Sub Spinner286_Change() With SpinButton1 If .Value > [c1] Then .Value = [c1] End With End Sub
Bookmarks