Onclick? Help Auto Add

  • Thread starter Thread starter Adam Bannister
  • Start date Start date
A

Adam Bannister

I need make a excel so that when i click a
Button it will Add 1 to B3 etc
So each time we sell a product we can just press + or - to add and remove a
figure from that field
 
Hi Adam,

You can use a spinner to do that.
Go to View>Toolbars>Forms
On the forms toolbar select the spinner (it's an up and down broad arrow
separated by a dash)
Your cursor will now be a small cross, just click and drag where you want
the button.
Right click on the button and goto Format Control where you can set
the cell link ($B$3 in your case), you can also set the incremental value as
well as many other parameters.
To adjust the size and location of your button you need to right click
on it and ignore the flyout menu, just click on the handles and drag it
around as you want.

HTH
Martin
 
I put a button from the Forms toolbar (not control toolbox toolbar) on the
worksheet and assigned it this macro:

Option Explicit
Sub testme()
With ActiveSheet
With .Range("B3")
If IsNumeric(.Value) Then
.Value = .Value + 1
Else
Beep
End If
End With
End With
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 

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

Back
Top