Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
spin button code
How do I get the spin button to control the text box I want TextNumberOfGames(TextBox) to change when the SpinNumberOfGames(SpinButton) is clicked up or down. This is all in a form. I have already set the min, max, and change. I would also like, if possible for the default to be 1, when the form opens. Thanks Josh -- jhahes ------------------------------------------------------------------------ jhahes's Profile: http://www.excelforum.com/member.php...o&userid=23596 View this thread: http://www.excelforum.com/showthread...hreadid=475931 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
spin button code
One way of doing it would be the following code (you'll have to insert
your limits)... Option Explicit Public i As Integer Private Sub SpinNumberOfGames_SpinDown() i = i - 1 TextNumberOfGames.Value = i End Sub Private Sub SpinNumberOfGames_SpinUp() i = i + 1 TextNumberOfGames.Value = i End Sub Private Sub UserForm_Activate() i = 1 TextNumberOfGames.Value = i End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
spin button code
In the change event of the spin button, update the textbox with the value of
the spin button In the initialize event of the userform, change the value of the spinbutton to 1. -- Regards, Tom Ogilvy "jhahes" wrote in message ... How do I get the spin button to control the text box I want TextNumberOfGames(TextBox) to change when the SpinNumberOfGames(SpinButton) is clicked up or down. This is all in a form. I have already set the min, max, and change. I would also like, if possible for the default to be 1, when the form opens. Thanks Josh -- jhahes ------------------------------------------------------------------------ jhahes's Profile: http://www.excelforum.com/member.php...o&userid=23596 View this thread: http://www.excelforum.com/showthread...hreadid=475931 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
spin button code
....and I never knew a SpinButton held its own value. Makes sense
really... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Spin Button | Excel Programming | |||
spin button value | Excel Discussion (Misc queries) | |||
spin button | Excel Programming | |||
Spin Button... | Excel Programming | |||
Spin Button | Excel Programming |