ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Spin button (https://www.excelbanter.com/excel-programming/437324-spin-button.html)

aqualibra

Spin button
 
I am using multiple spin buttons in my file.

For eg: Spin button 1 has options 1, 2, 3, 4, 5
Spin button 2 has options 1, 2, 3, 4, 5

If option 1 has been selected for spin button 1 then spin button 2 can be 2,
3, 4, 5
If spin button 1 = 2 then spin button 2 cannot = 2 and so forth.

Is this possible??

Thanks.

Todd Heiks

Spin button
 

"aqualibra" wrote in message
...
I am using multiple spin buttons in my file.

For eg: Spin button 1 has options 1, 2, 3, 4, 5
Spin button 2 has options 1, 2, 3, 4, 5

If option 1 has been selected for spin button 1 then spin button 2 can be
2,
3, 4, 5
If spin button 1 = 2 then spin button 2 cannot = 2 and so forth.

Is this possible??

Thanks.




Todd Heiks

Spin button
 

"aqualibra" wrote in message
...
I am using multiple spin buttons in my file.

For eg: Spin button 1 has options 1, 2, 3, 4, 5
Spin button 2 has options 1, 2, 3, 4, 5

If option 1 has been selected for spin button 1 then spin button 2 can be
2,
3, 4, 5
If spin button 1 = 2 then spin button 2 cannot = 2 and so forth.

Is this possible??

Thanks.



Does this work?
Private Sub sb1_SpinDown()
If sb1.Value = sb2.Value Then
If sb1.Value = 0 Then
sb1.Value = Max
Else
sb1.Value = sb2.Value - 1
End If
End If
TB1.Value = sb1.Value

End Sub



Paul

Spin button
 
I think you have two options :

1. Instead of using a spinner, use listboxes and populate one from the
selection made in the other.

2. Use two pictures (obviously one for up and one for down) for each
spinner that can be backed by code which will populate your target cells,
thus avoiding items that have already been selected

I would recommend the former option.
--
If the post is helpful, please consider donating something to an animal
charity on my behalf.


"aqualibra" wrote:

I am using multiple spin buttons in my file.

For eg: Spin button 1 has options 1, 2, 3, 4, 5
Spin button 2 has options 1, 2, 3, 4, 5

If option 1 has been selected for spin button 1 then spin button 2 can be 2,
3, 4, 5
If spin button 1 = 2 then spin button 2 cannot = 2 and so forth.

Is this possible??

Thanks.


ryguy7272

Spin button
 
Maybe this will give you some ideas:
http://www.contextures.com/xlDataVal02.html

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Todd Heiks" wrote:


"aqualibra" wrote in message
...
I am using multiple spin buttons in my file.

For eg: Spin button 1 has options 1, 2, 3, 4, 5
Spin button 2 has options 1, 2, 3, 4, 5

If option 1 has been selected for spin button 1 then spin button 2 can be
2,
3, 4, 5
If spin button 1 = 2 then spin button 2 cannot = 2 and so forth.

Is this possible??

Thanks.



Does this work?
Private Sub sb1_SpinDown()
If sb1.Value = sb2.Value Then
If sb1.Value = 0 Then
sb1.Value = Max
Else
sb1.Value = sb2.Value - 1
End If
End If
TB1.Value = sb1.Value

End Sub


.



All times are GMT +1. The time now is 03:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com