Thread: commands button
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Harald Staff Harald Staff is offline
external usenet poster
 
Posts: 292
Default commands button

Sure.

Open the VB editor (Alt F11 or similar).
Menu Insert Module.
Paste this into the module:

Sub Add3()
Range("C14").Value = Range("C14").Value + 3
End Sub

Return to Excel.
Show the Forms toolbar if it's hidden (View menu).
Put a button from it onto the worksheet.
Rightclick the button.
Choose Assign Macro, assign Add3 to it.
Voila.

HTH. Best wishes Harald


"pts" skrev i melding
...
is there a way to create a button in your spreadsheet which completes a
single command. Ie add 3 to a cell over and over so it just keeps
increasing
everytime you push the button