![]() |
Simpel commandbutton question
Is it possible to create a commandbutton that ads 1 to a specific cell (say
A1) each time you press it? |
Simpel commandbutton question
Try this:
Private Sub CommandButton1_Click() Dim x As Long x = Range("a1").Value x = x + 1 Range("a1").Value = x End Sub "Andy T via OfficeKB.com" wrote: Is it possible to create a commandbutton that ads 1 to a specific cell (say A1) each time you press it? |
Simpel commandbutton question
' Application.CommandBars("Forms").Visible = True
' ActiveSheet.Buttons.Add(172.5, 25.5, 52.5, 52.5).Select ' Application.Goto Reference:="Macro1" Dim count As Integer Range("B3") = Range("B3").Value + 1 The first 3 lines are commented because I recorded adding a button to the spreadsheet, then going into the macro editor. B3 is the cell I'm adding one too each button push. |
Simpel commandbutton question
|
All times are GMT +1. The time now is 06:33 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com