Basic Spin Button Code

G

Guest

I've done some MS Access VB, but this is my first attempt at programming in
Excel, so I'll really starting from scratch.

I want to insert a Spin Button that increases or decreases the value of Cell
A1 as the user selects up or down.

How do I reference the Spin button?, how do I know if the "up" option has
been selcted or the "down" option?

I know its a bit simple, but this should help me get going.

Many thanks for anyone with the patience for such a simple questions, or can
point me in the direction of some useful code / instructions or recommended
manual.

Regards

Winger
 
G

Guest

if you like the spinbutton to the cell, it will reflect the value of the spin
button - no code required.

Are you using a spinbutton (actually as "spinner") from the forms toolbar
(right click, select format control, then under control tab, use the linked
cell box)

or

from the control toolbox toolbar

right click on the control in design mode, select properties, select the
linkedcell property and put in
sheet1!A1 as an example.

In each case you have access to min, max and value type properties.
 
B

Bob Phillips

Assuming that you have added a spin button from the controls toolbox, if you
go to design mode (the blue-green triangle on the control toolbox toolbar)
and double-click the spinbutton, this takes you to the worksheet code module
with a skeleton event for that control. From there you can select the SpinUp
and SpinDown events and code into them.

--
HTH

Bob Phillips

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

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