View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default sum cells using command button ADD

In design mode, double-click on the button, and in the window that appears, put the code

Private Sub CommandButton1_Click() ' This may have number other than 1 appended
Range("A4").Value = Application.Sum(Range("A1:A3"))
End Sub

HTH,
Bernie
MS Excel MVP


"Dr.H.Subramanian" wrote in message
...
How to add values in a1,a2 and a3 cells and to show the result in a4 only by
clicking a command button inserted from the tools box. I want the simple
codes step by step.