drop down calendar

  • Thread starter Thread starter Glenn
  • Start date Start date
G

Glenn

I have a date field on one of my worksheets. I'd like to have it so that
when you click in the field the current month's calendar appears so that you
can click on a date to insert it. There should also be a way to click
through and see previous and future months.

How can I do this?

Thanks.
 
When I try that, I get an error.
Microsoft Visual Basic Run-time error '424'" Object Required

When you click debug, this is the line that is highlighted:

ElseIf Calendar1.Visible Then Calendar1.Visible = False
 
Hi Glen,

Glenn said:
When I try that, I get an error.
Microsoft Visual Basic Run-time error '424'" Object Required

When you click debug, this is the line that is highlighted:

ElseIf Calendar1.Visible Then Calendar1.Visible = False


It sounds as if you have not inserted a Calendar control onto the sheet.

At the top of the linked page, Ron says:

'------------------------------------------------
Use Insert-Object on the Worksheet Menu Bar to place a Calendar control on
your sheet.
It is possible you don't see it in the list, because it is installed with
Access.
So if you don't have that program installed you possible don't have the
control.
You can download it on the website on the bottom of this page if you don't
have it.

So if you don't have that program installed you possible don't have the
control.You can download it on the website on the bottom of this page if you
don't
have it."
'------------------------------------------------

After inserting the control, selecting a cell in the range A1:A20 shows the
calendar; selecting a cell elsewhere hides the control.
 
That's what was happening. However, I still have a problem...I'm trying to
get it to show up in just one particular cell (which is a cell that is
merged with the one right next to it). I can't get that to happen -- and I
think it is due to the merge because when I do it in a "single" cell I do
not have a problem.
 
Hi Glen


Glenn said:
That's what was happening. However, I still have a problem...I'm trying
to get it to show up in just one particular cell (which is a cell that is
merged with the one right next to it). I can't get that to happen -- and
I think it is due to the merge because when I do it in a "single" cell I
do not have a problem.

Merged cells cause a number of problems. Personally, I never use merged
cells.

I much prefer to use the CenterAcrossSelection option.

If you use this, Ron's code should operate as you want.
 
Correct, merged cells are always problems

Select the two cells and use center accros selection in the properties instead of merged cells
 
Back
Top