Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scroll bar increments select case?
I'm trying to change the increments of a scrollbar using select case,
but I can't quite get it, I'm sure its not too tough. Anybody have any advice? Sub ScrollBar3_Scroll() Select Case Range("AJ7").Value Case 101 To 199 ScrollBar3.SmallChange = 1 Case 200 To 298 ScrollBar3.SmallChange = 2 Case 300 To 395 ScrollBar3.SmallChange = 5 Case 400 To 590 ScrollBar3.SmallChange = 10 Case 600 To 980 ScrollBar3.SmallChange = 20 End Select End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scroll bar increments select case?
I've tried changing the code to this, but now I'm getting error 400 I'm
not really sure what to do. Sub ScrollBar1_Scroll() Select Case Range("L10") Case 101 To 199 ActiveSheet.OLEObjects("ScrollBar1").Object.SmallC hange = 1 Case 200 To 298 ActiveSheet.OLEObjects("ScrollBar1").Object.SmallC hange = 2 Case 300 To 395 ActiveSheet.OLEObjects("ScrollBar1").Object.SmallC hange = 5 Case 400 To 590 ActiveSheet.OLEObjects("ScrollBar1").Object.SmallC hange = 10 Case 600 To 980 ActiveSheet.OLEObjects("ScrollBar1").Object.SmallC hange = 20 End Select End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scroll bar increments select case?
Jeff,
I see this code in the _Scroll event. This does not fire if you click on the end arrows to change the value. Surprisingly the _Click event fires for this. I'm not sure what you are trying to achieve, but I not sure resetting the ..SmallChance every time you scroll is a good idea. You reset it when the value in AJ7 changes. NickHK "JeffMelton" wrote in message oups.com... I'm trying to change the increments of a scrollbar using select case, but I can't quite get it, I'm sure its not too tough. Anybody have any advice? Sub ScrollBar3_Scroll() Select Case Range("AJ7").Value Case 101 To 199 ScrollBar3.SmallChange = 1 Case 200 To 298 ScrollBar3.SmallChange = 2 Case 300 To 395 ScrollBar3.SmallChange = 5 Case 400 To 590 ScrollBar3.SmallChange = 10 Case 600 To 980 ScrollBar3.SmallChange = 20 End Select End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Case without Select Case error problem | Excel Discussion (Misc queries) | |||
How do i set the scroll bar for increments of 0.5? | Excel Worksheet Functions | |||
Select case | Excel Programming | |||
Forms - Scroll Bar or Spinner (Data in increments) | Excel Discussion (Misc queries) |