geekboy.101
New Member
- Joined
- Apr 23, 2010
- Messages
- 28
Hi,
I got a userform which contains a combobox which contains names of students, and 2 command buttons, Time In and Time Out (initially i wanted it to be just one button which changes between Time In and Time Out, but i haven't gotten around to searching for a way to do that). So what happens is a student looks for their name, clicks on time in and a name is entered under column A, then a timestamp is made on the adjacent cell under column B. Then if they click on time out, a timestamp is made under column C.
As you can see, it creates lots of potential problems. Biggest one is if the user clicks on time in twice, the data is entered twice, since the button works on finding the last empty row. If they click on time out without a time in. Column B is then left blank. So i got quite a number of kinks i need to work out.
First is, how do I ask the command button to look first on the list under column A if a name is entered in there already and send out an error alert that the person has already timed in.
As for the second question, i think i can prompt the macro to send out a popout dialog box if column b is empty.
I got a userform which contains a combobox which contains names of students, and 2 command buttons, Time In and Time Out (initially i wanted it to be just one button which changes between Time In and Time Out, but i haven't gotten around to searching for a way to do that). So what happens is a student looks for their name, clicks on time in and a name is entered under column A, then a timestamp is made on the adjacent cell under column B. Then if they click on time out, a timestamp is made under column C.
As you can see, it creates lots of potential problems. Biggest one is if the user clicks on time in twice, the data is entered twice, since the button works on finding the last empty row. If they click on time out without a time in. Column B is then left blank. So i got quite a number of kinks i need to work out.
First is, how do I ask the command button to look first on the list under column A if a name is entered in there already and send out an error alert that the person has already timed in.
As for the second question, i think i can prompt the macro to send out a popout dialog box if column b is empty.