PDA

View Full Version : Solved: Count click events then add value to label



Ben File
07-22-2009, 05:40 PM
Is there a way to count the number of times a person clicks on a button in a user form, and then populate a label with that value until the user form is closed.
What I am trying to do is every time the workbook is opened the information is added to the next blank row. The information added could be x amount of times. The label would count the x amount of times by keeping track of the click event.
See The Attachment.
1. Button = cmdAdd adds the data to the first blank cell.
2. Label = lblrecno would count the cmdAdd button click events.
I hope this makes sense. THANKS in advance.

tpoynton
07-22-2009, 06:14 PM
what's this for? sounds like homework. You can ask questions about homework, just be transparent about it!

rbrhodes
07-22-2009, 08:26 PM
Hi Ben,

Attached is the way I would do it. If it is homework, make sure you understand what I've done and can explain it before handing it in! Ask me for explanations if need be. It's about learning, either way.

Ben File
07-22-2009, 09:58 PM
THANK YOU ! THANK YOU! The code is well explained. Not for homework just an idea to use this label and the current day as unique identifier for each item added to my sheet. THANK YOU AGAIN.