Spinbutton

P

pcor

I would like to use a spinbutton on a userform. I can get the button to work
well going one way but can not seem to get it to go the other way. Ex
I would like to button to produce an acending number while clicking on one
side of the spinner and decending while clciking the other side
My code now reads as follow: spinbutton1.value=spinbutton1.value+1
and that add a one to the spinbutton when I press on EITHER side of the
button.
Thanks
 
J

Jim Cone

Look at the two drop downs at the top of the userform module.
The right drop down displays the "Events" associated with what is
selected in the left drop down...

Private Sub SpinButton1_SpinDown()
Cells(5, 2).Value = Me.SpinButton1.Value
End Sub

Private Sub SpinButton1_SpinUp()
Cells(5, 3).Value = Me.SpinButton1.Value
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"pcor"
wrote in message
I would like to use a spinbutton on a userform. I can get the button to work
well going one way but can not seem to get it to go the other way. Ex
I would like to button to produce an acending number while clicking on one
side of the spinner and decending while clciking the other side
My code now reads as follow: spinbutton1.value=spinbutton1.value+1
and that add a one to the spinbutton when I press on EITHER side of the
button.
Thanks
 

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