Spinners

B

Brad

I posted a question yesterday labelled (Spinners - minimum and maximum)

Restated that question is this - How can I make the maximum value on a
spinner to be variable? I want one spinner that will mark the starting point
- from 1 to 51 (this will remain constant). The second spinner's minimum
would be 1 with a maximum of (52 - spinner 1's starting point}).

I'm currently using ver-2000 will be upgraded to 2003 soon
 
B

Bob Phillips

On a userform?

Me.SpinButton2.Maximum = Me.SpinButton1.Maximum + 1

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
B

Brad

I don't believe that I used a userform

I simply grab a spinner off the toolbar (twice actually) - and cell-linked
it to the appropriate cells.

When I go into the properties - for the first spinner the minimum is 1 and
the maximum is 51 - first week of the year to the 51 week of the year

I want the second spinner to indicate how many weeks the individual wants to
show on the graph. If the first spinner has selected week 10 - I want the
maximum number for the second spinner to be 42. If the first spinner has
selected week 50 - I want the maximum number for the second spinner to be 2.

I'm willing to change how I'm doing this - but don't know of another way.

Thanks in advance for any help
 
B

Bob Phillips

Okay, is it a spinner from the forms toolbar or the control toolbox?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
B

Brad

The control toolbox

Bob Phillips said:
Okay, is it a spinner from the forms toolbar or the control toolbox?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
B

Bob Phillips

Darn, I prepared an answer for the forms spinner <g>

add this code to the worksheet code module for the spinners.

Private Sub SpinButton1_SpinDown()
Me.OLEObjects("SpinButton2").Object.Max = _
52 - Me.OLEObjects("SpinButton1").Object.Value
End Sub

Private Sub SpinButton1_SpinUp()
Me.OLEObjects("SpinButton2").Object.Max = _
52 - Me.OLEObjects("SpinButton1").Object.Value
End Sub

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
B

Brad

That worked - thank you very much. I really need to pick up a VBA book for
Excel to learn how to do work with macro's - any recommendations
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top