View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Increment Cell Value by 1

Assign your button to:

Sub marine()
With Workbooks("Book1.xls").Sheets("Sheet1").Range("C2" )
.Value = .Value + 1
End With
End Sub

--
Gary's Student
gsnu200703


"bob" wrote:

I have a fairly simple operation I am trying to implement.

I have a command button called "Screen" in worksheet "Sheet1" of Workbook
"Book1". When I click it, I want the value in cell C2 to increase by one
(e.g., if C2 = 3, I want it to automatically increase to 4 when I click
Screen.

Can anyone provide code for this operation?

Thanks,
Bob