Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11
Default buttons in excel 2003

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   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 4,393
Default buttons in excel 2003

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   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11
Default buttons in excel 2003

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   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 22,906
Default buttons in excel 2003

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Option Buttons from the Forms Toolbar - Excel 2003 mickey Excel Worksheet Functions 2 October 14th 07 11:32 AM
Trouble getting new toolbar buttons to work properly in Excel 2003 Dave in Nashville Excel Worksheet Functions 1 June 22nd 06 05:41 AM
How do I get Excel 2000 command buttons to show in Excel 2003? John Excel Discussion (Misc queries) 0 March 23rd 06 05:16 AM
tab scrolling buttons - excel 2003 missdona Excel Worksheet Functions 1 September 13th 05 08:22 PM
excel 2003 - macros & buttons mikey New Users to Excel 2 May 19th 05 11:51 AM


All times are GMT +1. The time now is 09:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"