ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   counting button (https://www.excelbanter.com/excel-discussion-misc-queries/86148-counting-button.html)

[email protected]

counting button
 
Hi, sorry if this is a stupid question (yes the DO exist). I have been
asked to do some trivial counting of some stuff, raise the number one
each time this or this happens and so on. So I was thinking that it
must be possible to make a button that I just click and the increase
the number by one, instead of editing the number manually. Maybe I'm
lazy, but I have to a lot of this stuff and now I'm also curios about
how I can make such a button.

Hope that this made some sense and sorry about my English.



Jesper


Bob Phillips

counting button
 
Create a macro like so

Sub AddOne()
With Worksheets("Sheet1").Range("A1")
.Value = .Value + 1
End With
End Sub

and then copy a commandbutton from the Forms Toolbar onto the worksheet and
assign AddOne to that button when prompted..

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

wrote in message
oups.com...
Hi, sorry if this is a stupid question (yes the DO exist). I have been
asked to do some trivial counting of some stuff, raise the number one
each time this or this happens and so on. So I was thinking that it
must be possible to make a button that I just click and the increase
the number by one, instead of editing the number manually. Maybe I'm
lazy, but I have to a lot of this stuff and now I'm also curios about
how I can make such a button.

Hope that this made some sense and sorry about my English.



Jesper





All times are GMT +1. The time now is 02:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com