Thread: update variable
View Single Post
  #3   Report Post  
JulieD
 
Posts: n/a
Default

Hi

assuming you mean a cell value by 1 something along the lines of

Sub increasevalue()
If IsNumeric(Range("A1")) Or IsNull(Range("A1")) Then _
Range("A1").Value = Range("A1").Value + 1
End Sub

if this isn't what you've after could you please explain what you mean by a
"variable"

Cheers
JulieD

"nc" wrote in message
...
Hi

How can I update a variable by a value of one each time a
command button is clicked using macros?

Thanks.