Ok, Well... this code i came up with does excatly what it's suppose to but...
.. Not really. First off, It would be so much more effecient if i was able to call it from a module, but because i need the values to load when the userform is initialised it doesnt appear that i can. Is there some special trick to calling a sub statement from a userform initialise procedure ? Thats really where my problem lies.
I'll try to explain then I'll show a bit of my code. I'm creating a scheduling program and so far I like my set up. My sheet has names, days, and hours per day. A button on that sheet pulls up a userform which is linked to the names. Radio buttons are set up next to the names to select that person. I select a radio button and click next, and that pulls up another userform with the selected persons name, and hours in textboxes ( this is to make it easy to change there hours ) . I then have several if statements using cell refrence with a row and col variable if the select days start time is not available then it puts a "-" in that text box. if it is present then it writes the refrenced cell into the correct textbox.
Now, heres my problem, I have 15 employees... Thats a lot of if statements, Using my declared variables, (row, col ) I can use the same code over and over just by changing the row and col, Only problem is its like 1000 lines to do all employees and fill all the textboxes. So what I need is a way to fill a userform from either
a: a sub procedure
b: some other way
this is just a fraction of my code.
It goes all the way to friday. As you can see its a lot of stuff because I have to do it for each day of the week, then each day has 2 times, start time and a finish time. This gives me an error also, pretty much telling me theres to much code to initialise.
If anyone has any ideas as to how i can call this instead of having to write it over and over please tell me
Thanks in advance.
Chris
Bookmarks