View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
RyanH RyanH is offline
external usenet poster
 
Posts: 586
Default Listbox 01 -- 50 in UserForm

Thanks for the suggestion. For some reason it is saying the .LargeChange =
10 is not a valid property of the scroll bar. Any idea why?

Thanks
Ryan

"Dave Peterson" wrote:

An alternative to JE's suggestion is to use a label and an a scrollbar.
Sometimes, clicking 50 times on a spinner can be too much to ask the user to do.

Option Explicit
Private Sub ScrollBar1_Change()
Me.Label1.Caption = Me.ScrollBar1.Value
End Sub
Private Sub UserForm_Initialize()
With Me.ScrollBar1
.Max = 50
.Min = 1
.LargeChange = 10
.SmallChange = 1
.Value = 1
Me.Label1.Caption = .Value
End With
End Sub


RyanH wrote:

I have a Combo Box in a UserForm with values that range from 01 to 50. Is
there a way that I can have my users just click an up or down arrow next to a
ListBox and the number will have 1 added or subtracted from the number in the
listbox. For example, the Number in the list box is "03", if the user clicks
the up arrow "04" is displayed. If the user clicks the down arrow "02" is
displayed. I figure this would be better than a combo box.

Thanks in Advance,
Ryan


--

Dave Peterson