Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to create a commandbutton that ads 1 to a specific cell (say
A1) each time you press it? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
' 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. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
CommandButton | Excel Programming | |||
Simple Question: Hiding a CommandButton | Excel Programming | |||
CommandButton | Excel Programming | |||
CommandButton | Excel Programming | |||
Commandbutton | Excel Programming |