Count And Save Command Button Clicks To A Cell

  • Hey guys,

    I have a form with 2 Text fields. Box 1 is a combobox with names. Box 2 is a textbox that a number goes in. I need a way to count how many times the command button is clicked for each name in my combobox then submit the number into a predetermend cell.

    Example.

    If my combobox has John in it and has 25 in the textbox, after i hit submit the counter should show john 25 1

    and so on for each name.

    I have already created and programmed the table. I just need to add a click counter for each name.

    Thanks in advance.

    The only other thread i found on this topic wasnt what i needed.

    [SIZE=3]The Only Dumb Question Is A Question Not Asked.[/SIZE]

  • Re: Count And Save Command Button Clicks To A Cell


    Nevermind guys i got it sorted, in case anyone else has the same problem i did here is my code.


    Code
    Dim x As Integer
    x = Worksheets("Sheet Name Here").Range("Cell Here")
    Worksheets("Same Sheet Name here").Range("Same Cell Here").Value = x + 1



    Place this in the command button click event and where you place the range is where the counter will go. Every time the command button is pressed the counter goes up by 1.

    [SIZE=3]The Only Dumb Question Is A Question Not Asked.[/SIZE]

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!