I would like to click on a command button - it would then add 1 to a
predetermined cell
I would like to click on a command button - it would then add 1 to a
predetermined cell
Which bit do you want, the add bit
With Range("H10")
.Value = .Value + 1
End With
or add the button. Drag it off the Forms toolbar and assign a macro with the
above code
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Chance" <[email protected]> wrote in message
news:[email protected]...
> I would like to click on a command button - it would then add 1 to a
> predetermined cell
Hi
You do not say at what stage this cell will be determined? Is it always the
same cell, is it the active cell, or do you want to establish which cell is
to be acted on?
--
[email protected]ve_2nd_at. Randburg, Gauteng, South Africa
"Chance" wrote:
> I would like to click on a command button - it would then add 1 to a
> predetermined cell
Always the same cell
"Kassie" wrote:
> Hi
>
> You do not say at what stage this cell will be determined? Is it always the
> same cell, is it the active cell, or do you want to establish which cell is
> to be acted on?
>
> --
> [email protected]ve_2nd_at. Randburg, Gauteng, South Africa
>
>
> "Chance" wrote:
>
> > I would like to click on a command button - it would then add 1 to a
> > predetermined cell
I wanted the code.
Thank you
"Bob Phillips" wrote:
> Which bit do you want, the add bit
>
> With Range("H10")
> .Value = .Value + 1
> End With
>
> or add the button. Drag it off the Forms toolbar and assign a macro with the
> above code
>
> --
>
> HTH
>
> RP
> (remove nothere from the email address if mailing direct)
>
>
> "Chance" <[email protected]> wrote in message
> news:[email protected]...
> > I would like to click on a command button - it would then add 1 to a
> > predetermined cell
>
>
>
You need to have a blank cell to the right of the number you are adding to, then select that blank cell hit the combined button assigned to macro below.
Sub PlusOne()
ActiveCell.FormulaR1C1 = "=RC[-1]+1"
End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks