I have attached a dummy worksheet that I need help with. I am working on creating an automated scheduling system. The first two worksheets have tables that show a schedule for up to a year.
On a seperate sheet (not in the dummy workbook) I have a commandbutton "Print". When the user clicks on that I need to get the following information from them: Date and what to print.
I have created the following UserForm (attached) to get that information (but I dont know how to actually implement it).
Based on the date entered in the ComboBoxes I need to copy a section of the schedules from sheets1 and 2 and paste it into sheet 3 (14 days of the schedule where the first day is the day entered by the user)
Then, sheet 3 needs to be printed. Based on what the user selected in the userform all of the tables may be printed or only certain ones (one table per sheet on legal size).
I am having trouble with deciding how to get the user input as I have never worked with userforms. I am open to suggestions about maybe getting the input some other way (but I would prefer that it would stay as optionbuttons and comboboxes). Also, I am not sure how to paste ranges (I am sure it is very simple but I was getting a lot of errors when I tried it previously). I have also never worked with any printing functions in VBA (Im not even sure if they exist).
Any help is greatly appreciated.
Thank you very much.
Last edited by nbuk; 06-30-2010 at 01:04 PM. Reason: Change title
Hello nbuk,
It is better to post the UserForm code than a picture. With the code, there is no guessing as to what you have named the controls and it is easier to add to your existing code than recreate it from scratch.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
I have figured out the UserForm and how to copy and paste a range. All i need now is to find a function to print a range automatically to the default printer and set the paper size to legal. Any suggestions?
Your post does not comply with Rule 7 of our Forum RULES. Please do not ignore Moderators' or Administrators' requests - note that this includes requests by senior members as well, if you are unclear about their request or instruction then send a private message to them asking for help. Do not post a reply to a thread where a moderator has requested an action that has not been complied with e.g Title change or Code tags...etc
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
I'll be closing this Thread shortly!
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
I am sorry I thought the problem was the wrong spelling of 'Userform' in the title which I changed. Can you please give me more details on what is wrong with my post?
Your thread is being closed for non compliance with our rules. Please PM me when you have read the forum rules RULES and prepared to make the changes to your post accordingly, I will then unlock your post so you may continue with the thread!
Post Closed
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks