Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Case without Select Case error problem Ayo Excel Discussion (Misc queries) 2 May 16th 08 03:48 PM
How do i set the scroll bar for increments of 0.5? Akrodon Excel Worksheet Functions 1 November 21st 07 05:19 PM
Select case Sandy[_6_] Excel Programming 2 July 3rd 05 09:23 PM
Forms - Scroll Bar or Spinner (Data in increments) JEFF Excel Discussion (Misc queries) 4 June 7th 05 01:06 AM


All times are GMT +1. The time now is 01:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"