counter in excel from the push of a button

lesch2k

Golden Member
Feb 15, 2001
1,159
0
71
i want to stick a button on an excel sheet that will increment the value of a specific cell every tiime the button is pushed.

how do i do that?
 

Whitecloak

Diamond Member
May 4, 2001
6,074
2
0
1. Use the Control Toolbox to drag and drop a comman button on an excel sheet.
2. Double-clicking the button will take you to the VBA IDE with the default event being on-click.
3. In that method, use the following line of code me.cells(1,1).value = me.cells(1,1) + 1 // Instead of (1,1) use any cell you need to
4. Close the VBA IDE and exit the design mode
5.....
6. Profit

:D
 

lesch2k

Golden Member
Feb 15, 2001
1,159
0
71
Originally posted by: whitecloak
1. Use the Control Toolbox to drag and drop a comman button on an excel sheet.
2. Double-clicking the button will take you to the VBA IDE with the default event being on-click.
3. In that method, use the following line of code me.cells(1,1).value = me.cells(1,1) + 1 // Instead of (1,1) use any cell you need to
4. Close the VBA IDE and exit the design mode
5.....
6. Profit

:D

thanks a lot man. i knew it was doable i just didnt know the syntax