+ Reply to Thread
Results 1 to 6 of 6

Using a command button to add

  1. #1
    Chance
    Guest

    Using a command button to add

    I would like to click on a command button - it would then add 1 to a
    predetermined cell

  2. #2
    Bob Phillips
    Guest

    Re: Using a command button to add

    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




  3. #3
    Kassie
    Guest

    RE: Using a command button to add

    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


  4. #4
    Chance
    Guest

    RE: Using a command button to add

    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


  5. #5
    Chance
    Guest

    Re: Using a command button to add

    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

    >
    >
    >


  6. #6
    Registered User
    Join Date
    09-15-2005
    Posts
    90
    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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1