View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Sean Timmons Sean Timmons is offline
external usenet poster
 
Posts: 1,696
Default Command button macro

Public Sub Increment()
Range("A1").Value = 0
Range("A1").Value = Range("A1").Value + 1
End Sub

Would reset the cell, but then that means you're always goingto have 0, then
1........

"Mark N" wrote:

Thanks Jim,
I forgot but i would need to reset the cell also. do i need another command
button to reset?

"Jim Thomlinson" wrote:

Place this code in a standard code module and assign it to a coomand button...

Public Sub Increment()
Range("A1").Value = Range("A1").Value + 1
End Sub
--
HTH...

Jim Thomlinson


"Mark N" wrote:

I want to assign a macro to a command button so that it increases the value
of a cell by 1
Thanks in advance if you can help me.