Hi all. I have several questions for you gurus but I will start with a brief background. I have done some coding before but mainly html and CSS, I think I covered some VB at college, but that was some 20 years ago but some screens do look familiar but cannot remember any of it.
Just so you know roughly what its all about... I am making an excel document for staff to check and submit their annual leave to. I have completed the database and got all the formulas how I want them, its just the userforms to make it easier to enter data is where I need help.
The database consists of (amongst others) firstly the date, how many staff we have, the number on annual leave, the number on other leave (training, etc) and probably the most important box; a formula box calculating how many people can take annual leave on that day taking into account the minimum strength and those who already have it off.
Need to know bit ==> To the right of this are two boxes, 4 horizontal cells for peoples staff numbers that are taking annual leave, then 6 cells for peoples staff numbers that are taking other leave. These two groups are totalled using a COUNT formula to work out how many are off on ether.
What I need to do ==> I need to make a userform that will do the following:
1) Have a text box which will, when entered with a date (that the staff want annual leave for) will go off and search in the correct date row (date is first column) into cell 'O' and return the result next to the text box on the form. (This will be a number 0-4)
2) IF the number is equal or greater than 1 (then annual leave can be granted) another button appears next to this and says book which when clicked, adds the persons staff number (maybe entered in an text box before the date) to the next available Annual Leave box cell as mentioned earlier. These cells are Q,R,S,T,U,V.
3) IF the result to 2) is 0 (annual leave cannot be granted) the result will just say 0 or No and no button will appear to submit the annual leave.
It don't sound amazingly difficult in my head, but I understand it probably is so any advice, no matter how small, and a few notes on the coding that you post would be greatly welcomed.
I will try and post an image of the database and mock form that I am trying to create to aid you.
Thanking you greatly in advance.
Steve.
Bookmarks