Share via

macro for button to increase count

Anonymous
2010-06-14T20:06:25+00:00

I need to increase the count each time i click the button, i need a macro for this.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2010-06-14T20:55:41+00:00

You can drop the Value argument since it is the default and there are no other issues going on:

[A1] = [A1] + 1


If this answer solves your problem, please check Mark as Answered. If this answer helps, please click the Vote as Helpful button. Cheers, Shane Devenshire

Was this answer helpful?

40+ people found this answer helpful.
0 comments No comments

9 additional answers

Sort by: Most helpful
  1. Anonymous
    2010-06-14T21:38:05+00:00

    hi

    which one is the count?

    Post the code that you tried.

    regards

    FSt1

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2010-06-14T21:54:21+00:00

    this is what I want to do is when I click button the value in what ever cell on have highlighted increases in value. I used this last year and it worked great I only had to creat one button and just put my pointer on the cell then click the button and the number increased. so I tried the A1.value. = a1.value +1 and it only increases a1 and not the others.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2010-06-14T21:13:19+00:00

    I was using the button on forms, I tried command button but could not get it to work, I have my spread sheet as follows    

                              b       c        d         e       f

     10                       1

    12                               1

    14                                          1

    when I click the button I would like the count to advance one

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2010-06-14T20:27:20+00:00

    hi

    try this.

    Private Sub CommandButton1_Click()

    [A1].Value = [A1].Value + 1

    End Sub

    i assumed that you are using a button from the control toolbox

    make other adjustment as needed

    regards

    FSt1

    Was this answer helpful?

    0 comments No comments