Forms - Scroll Bar or Spinner (Data in increments)

J

JEFF

Hello All,

I'm a first time user of a form. I'd like to use the Scroll Bar, but two
problems:

1. It only allows whole numbers (I'd like to use %)
2. Max value is 30,000 (I'd like it to be higher)

Any thoughts?

TIA
 
D

dominicb

Good evening Jeff

I have always found spinners a little restrictive in using whole
numbers, (after all Excel uses them in places so why can't we?). You
don't have to actually place the spinner counter on screen, you could
link the spinner to a text box and display the result of the spinner
divided by 10 to get a decimal place in the text box - it's cheating
but it can be done.

Alternatively, set up two small buttons next to a text box, using
symbols from the wingdings character set as up and down arrows. Each
of these buttons needs a piece of code attached to increase or decrease
the value of the text box accordingly. You couldn't get this to look
exactly like the Excel equivalent, but you won't have any restrictions
and can format it how you please.

HTH

DominicB
 
J

JustinLabenne

JEFF said:
Hello All,

I'm a first time user of a form. I'd like to use the Scroll Bar, bu
two
problems:

1. It only allows whole numbers (I'd like to use %)
2. Max value is 30,000 (I'd like it to be higher)

Any thoughts?

TIA

With the (userform) scroll bar selected, press F4. This displays th
Properties Window. You can change the "Max" property for the top limi
to go. I set it to 100000 no problem. As for percentages, not sure ho
you want it formatted but I just put a label on the form to reflect th
updating scrollbar value with a percentage sign behind it. ?

Private Sub ScrollBar1_Scroll()
' Label is renamed as "lblValue"
lblValue.Caption = ScrollBar1.Value & "%"
End Su
 
Top