PDA

View Full Version : Building a Calendar in Excel?



ba_news
11-06-2008, 08:46 AM
I have a fairly involved question. I'm trying to create a payroll calendar. The way it's meant to work is that users start by viewing a calendar. When they click on a day, they get a menu with 1) a drop-down list of employee names, and 2) two blanks for entering when they started and stopped working).

What I need help with is:

* Making the calendar areas clickable (do I use a command button, or something else?)
* Making a menu with the options I mentioned (names from a different sheet in the workbook, blanks for times).
* Automatically entering the results into a different spreadsheet.

Thanks for your help!

georgiboy
11-06-2008, 09:57 AM
May i start by saying, Welcome aboard :hi:

I hope the attatched file will answer your questions.

If you would like a more worksheet orientated calendar then let me know as this is a different kettle of fish.

lucas
11-06-2008, 09:57 AM
Why not put the calendar on a userform? You can used the calendar control.

lucas
11-06-2008, 10:09 AM
Here's an alternative to georgiboys file. His uses the excel calendar control which sometimes causes problems if you send the file to someone else who doesn't have the calendar control installed.

If you are not going to be sharing it then that solution will work fine. If you are going to be sending it out to other users you might want to try something like the attached.

Note: I didn't refine it for your purpose as Georgiboy did but it is a good example and easy to alter to your needs usually.


For a previous discussion on problems with calendar control see this thread:
http://www.vbaexpress.com/forum/showthread.php?t=10914

georgiboy
11-06-2008, 10:24 AM
Lucas i did not know there was so much (hate) for a strong word for the calendar control. I do like the file you have provided, it must have taken alot of refining to get it working that well. I have some files that may have a strong use for this.
:beerchug:

lucas
11-06-2008, 10:28 AM
Lucas i did not know there was so much (hate) for a strong word for the calendar control. I do like the file you have provided, it must have taken alot of refining to get it working that well. I have some files that may have a strong use for this.
:beerchug:

Hate is such a strong word......frustration after working and incorporating calendar controls just to find it doesn't work when you distribute it can get you pretty upset though.

Glad to share. I think a similar version is in the kb.

ba_news
11-06-2008, 10:29 AM
Georgiboy, I like your solution a lot. One issue I've noticed is that each time I click on the calendar button, it adds all of the names to the list again. I think replacing "UserForm_Activate()" with "UserForm_Initialize()" fixes this, though.