Hi folks,
I used the formula below to simply click the command button to add 1 to the number
Private Sub CommandButton1_Click()
Dim x As Integer
x = Range("A1").Value
Range("A1").Value = x + 1
End Sub
The application is... I am counting visitors between a 2 hour time period during the day in a retail store. So, I need approx 5 buttons. I copied the original button and then changed the code to point to the proper cell, however, every one of the buttons maintains the cell address of the latest button for which I changed the cell address?? It seems I am unable to have multiple buttons performing the same task, but for adjoining cells. Is there a way around that? (I will also be replicating the sheet for each week)
I am not an excel WIZARD but thought I had this one figured out. Thank you if you are able to help
Greg
I used the formula below to simply click the command button to add 1 to the number
Private Sub CommandButton1_Click()
Dim x As Integer
x = Range("A1").Value
Range("A1").Value = x + 1
End Sub
The application is... I am counting visitors between a 2 hour time period during the day in a retail store. So, I need approx 5 buttons. I copied the original button and then changed the code to point to the proper cell, however, every one of the buttons maintains the cell address of the latest button for which I changed the cell address?? It seems I am unable to have multiple buttons performing the same task, but for adjoining cells. Is there a way around that? (I will also be replicating the sheet for each week)
I am not an excel WIZARD but thought I had this one figured out. Thank you if you are able to help
Greg