Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Hi
I have just put 2 buttons in a worksheet. I want the 1st button to put a value of plus 1 every time it is pushed in a specific cell. ie if it is pushed 3 times to display 3 in a specific cell. I want the other button to do the same only minus. ie if it is pushed 3 times to display -3 in a specific cell. I am very new to this any help will be appretiated. |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
I will assume you used the button for the Forms toolbar rather than an The
Controls Toolbar. Right click the first button; select Assign Macro; click the New option Copy this to the module, change A1 to whatever cell you want incremented Sub Button1_Click() Range("A1") = Range("A1") + 1 End Sub If New is unavailable click Edit and fix the sub to read as above Repeat for second button using Sub Button2_Click() Range("A1") = Range("A1") - 1 End Sub If you are using a Command Button: right click it and select View Code and use Private Sub CommandButton1_Click() Range("A1") = Range("A1") + 1 End Sub You will need to click a cell to exit Edit mode on the button best wishes -- Bernard V Liengme Microsoft Excel MVP www.stfx.ca/people/bliengme remove caps from email "neilb514" wrote in message ... Hi I have just put 2 buttons in a worksheet. I want the 1st button to put a value of plus 1 every time it is pushed in a specific cell. ie if it is pushed 3 times to display 3 in a specific cell. I want the other button to do the same only minus. ie if it is pushed 3 times to display -3 in a specific cell. I am very new to this any help will be appretiated. |
#3
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Absolutly fantastic,
thankyou. "Bernard Liengme" wrote: I will assume you used the button for the Forms toolbar rather than an The Controls Toolbar. Right click the first button; select Assign Macro; click the New option Copy this to the module, change A1 to whatever cell you want incremented Sub Button1_Click() Range("A1") = Range("A1") + 1 End Sub If New is unavailable click Edit and fix the sub to read as above Repeat for second button using Sub Button2_Click() Range("A1") = Range("A1") - 1 End Sub If you are using a Command Button: right click it and select View Code and use Private Sub CommandButton1_Click() Range("A1") = Range("A1") + 1 End Sub You will need to click a cell to exit Edit mode on the button best wishes -- Bernard V Liengme Microsoft Excel MVP www.stfx.ca/people/bliengme remove caps from email "neilb514" wrote in message ... Hi I have just put 2 buttons in a worksheet. I want the 1st button to put a value of plus 1 every time it is pushed in a specific cell. ie if it is pushed 3 times to display 3 in a specific cell. I want the other button to do the same only minus. ie if it is pushed 3 times to display -3 in a specific cell. I am very new to this any help will be appretiated. |
#4
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
You could use Spinner buttons from the Forms Toolbar linked to your cell(s) to
go up or down at a click. Or see Bernie's response which could be more what you want. Gord Dibben MS Excel MVP On Wed, 28 Nov 2007 09:53:03 -0800, neilb514 wrote: Hi I have just put 2 buttons in a worksheet. I want the 1st button to put a value of plus 1 every time it is pushed in a specific cell. ie if it is pushed 3 times to display 3 in a specific cell. I want the other button to do the same only minus. ie if it is pushed 3 times to display -3 in a specific cell. I am very new to this any help will be appretiated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Option Buttons from the Forms Toolbar - Excel 2003 | Excel Worksheet Functions | |||
Trouble getting new toolbar buttons to work properly in Excel 2003 | Excel Worksheet Functions | |||
How do I get Excel 2000 command buttons to show in Excel 2003? | Excel Discussion (Misc queries) | |||
tab scrolling buttons - excel 2003 | Excel Worksheet Functions | |||
excel 2003 - macros & buttons | New Users to Excel |