Thread: Counter button
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Counter button

Dennis,

After creating you command button assign this code. You might also consider
doing some error checking because it the cell contains text adding 1 will
give an error.

Sub Button1_Click()
Range("A1").Value = Range("A1").Value + 1
End Sub

Mike

"Dennis" wrote:

How would I go about coding a command button to advance a number in another
cell by 1 each time the button is clicked, like a counter?