![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 21
|
ON MY SPREADSHEET I HAVE PLACED A BUTTON CALLED ADD.
EACH TIME THE BUTTON IS PRESSED I WANT TO ADD 1 TO THE CELL F2. PLEASE COULD SOMEONE TELL ME HOW I DO IT? THANKS |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Helena, MT
Posts: 13,690
|
Assign this code to your button.
Sub Button1_Click() Range("F2").Value = Range("F2").Value + 1 End Sub |
|
|
|
|
|
#3 |
|
New Member
Join Date: Apr 2002
Posts: 21
|
THANKS
|
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Also, you could have placed a Spinner (from the Forms toolbar) on your worksheet and configured it (by right clicking on the object and choosing Format Control...) to increment and decrement by 1.
[ This Message was edited by: Mark W. on 2002-05-22 15:35 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|