Can anyone tell me how I can make a calendar that pops up when the user mouse clicks or tabs/arrows over to a cell so they can choose a date instead of manually typing in the date?
Can anyone tell me how I can make a calendar that pops up when the user mouse clicks or tabs/arrows over to a cell so they can choose a date instead of manually typing in the date?
Last edited by zoneblitz61; 10-04-2008 at 12:49 PM.
Not the best, but you can try
http://cpap.com.br/orlando/ExcelCale...re.asp?IdC=New
I need your support to add reputations if my solution works.
Hi Zone,
A pretty simple way to do this is:
1. In your worksheet, click Insert -> Object -> Calendar Control 8.0
.... If you don't see Calendar Control 8.0 in the list, mscal.ocx may not be registered properly or may be missing (in which case you can download a copy and put it into c:\windows\system32, then register it from the Start -> Run command using regsvr32 mscal.ocx). After registering it, re-open Excel and try step 1 again.
2. Once the calendar is on the worksheet, you should see it along with a small menu with some design tools on it. Click that so it is selected (in Design mode) then double-click the calendar itself. This will open the VBA Editor.
3. You should see the code shown in blue; you just need to add the code in red.
4. In the VBA Editor, just above the code shown in step 3, are two drop-down boxes. From the first one, select 'Worksheet'; from the second choose SelectionChange. That will add a new Sub/EndSub to your code window. Update that code to what's shown below:![]()
Please Login or Register to view this content.
Change the cell reference of "$A$2" to the cell you want to trigger the pop-up. Finally, close the VBA Editor and save your file.![]()
Please Login or Register to view this content.
Anytime you click on or arrow into cell A2 (or any cell you define), the calendar will appear for you to pick a date. Any date you pick will be entered into that cell. (When you select any other cell, the calendar will disappear.
Hopefully that helps you out, and it doesn't require a UserForm or add-in.
@pjoaquin: awesome, thanks. How can I do that but for an entire column instead of just one cell, i.e. the user clicks on any cell in column B?
change
to![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Please Read Forum Rules Before Posting
Wrap VBA code by selecting the code and clicking the # icon or Read This
How To Cross Post politely
Top Excel links for beginners to Experts
If you are pleased with a member's answer then use the Scales icon to rate it
If my reply has assistedor failed to assist you
I welcome your Feedback.
you guys rock. thanks.
zoneblitz61
If your query has been fully answered how about marking your thread Solved
This is awesome, just what I was looking for.
One question, is there a way to make the location of the calendar relative to what cell you are in? Right now I have a locked pane that the calendar is in so it's always on the screen, however I'd like it to pop up in the cell to the left (or right) of the one being clicked on..is this possible?
Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks