ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Use button to add 1 to total (https://www.excelbanter.com/excel-programming/431704-use-button-add-1-total.html)

ruben2091

Use button to add 1 to total
 
Hello,
I need to add a button to my worksheet that adds 1 to the total when
clicked. For example, there will be a cell showing a total of 0, but I need
it to increase by one everytime I hit the button.

Thanks

AltaEgo

Use button to add 1 to total
 
After you add your button, right-click the button
click view code
add the following on the line before 'End Sub'

Const YourCell = "A1" 'change
Range(YourCell) = Range(YourCell) + 1

--
Steve

"ruben2091" wrote in message
...
Hello,
I need to add a button to my worksheet that adds 1 to the total when
clicked. For example, there will be a cell showing a total of 0, but I
need
it to increase by one everytime I hit the button.

Thanks



ruben2091

Use button to add 1 to total
 
Thank you so much Steve. That worked.

"AltaEgo" wrote:

After you add your button, right-click the button
click view code
add the following on the line before 'End Sub'

Const YourCell = "A1" 'change
Range(YourCell) = Range(YourCell) + 1

--
Steve

"ruben2091" wrote in message
...
Hello,
I need to add a button to my worksheet that adds 1 to the total when
clicked. For example, there will be a cell showing a total of 0, but I
need
it to increase by one everytime I hit the button.

Thanks





All times are GMT +1. The time now is 08:20 AM.

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