Using Calendar control to display dates

R

Ronio

I visit the Ron De Bruin site for information on the Calendar control.
However, he only gives an example of how the calendar control can be used as
a date picker.

I would like to use the control to display predefined dates on another sheet
in the same book. So it is really just a graphical viewer.

Example is sheet1, Column A would have project names, Column B would have
targeted installation dates.

Sheet2 would be my calendar control to view the sheet1 data.

Any ideas would be much obliged.
 
S

ShaneDevenshire

Hi

You can attach code to the calendar by right clicking it and choosing View
Code.

You could attach code to the calendar's Click event or the sheets Activate
even, for example.

Here are some examples of code:

Calendar1.Day = Day(Now())
Calendar1.Month = Month(Range("A2")
Calendar1.Year = Year([A2])

where A2 contains a legal date
 
R

Ronio

That works if I only need to view one entry at a time. I was hoping for a
view that would show multiple entries at the same time.

ShaneDevenshire said:
Hi

You can attach code to the calendar by right clicking it and choosing View
Code.

You could attach code to the calendar's Click event or the sheets Activate
even, for example.

Here are some examples of code:

Calendar1.Day = Day(Now())
Calendar1.Month = Month(Range("A2")
Calendar1.Year = Year([A2])

where A2 contains a legal date
--
Cheers,
Shane Devenshire
Microsoft Excel MVP

Ronio said:
I visit the Ron De Bruin site for information on the Calendar control.
However, he only gives an example of how the calendar control can be used as
a date picker.

I would like to use the control to display predefined dates on another sheet
in the same book. So it is really just a graphical viewer.

Example is sheet1, Column A would have project names, Column B would have
targeted installation dates.

Sheet2 would be my calendar control to view the sheet1 data.

Any ideas would be much obliged.
 
J

Jim Thomlinson

Calendar controls do not have a multi select option...
--
HTH...

Jim Thomlinson


Ronio said:
That works if I only need to view one entry at a time. I was hoping for a
view that would show multiple entries at the same time.

ShaneDevenshire said:
Hi

You can attach code to the calendar by right clicking it and choosing View
Code.

You could attach code to the calendar's Click event or the sheets Activate
even, for example.

Here are some examples of code:

Calendar1.Day = Day(Now())
Calendar1.Month = Month(Range("A2")
Calendar1.Year = Year([A2])

where A2 contains a legal date
--
Cheers,
Shane Devenshire
Microsoft Excel MVP

Ronio said:
I visit the Ron De Bruin site for information on the Calendar control.
However, he only gives an example of how the calendar control can be used as
a date picker.

I would like to use the control to display predefined dates on another sheet
in the same book. So it is really just a graphical viewer.

Example is sheet1, Column A would have project names, Column B would have
targeted installation dates.

Sheet2 would be my calendar control to view the sheet1 data.

Any ideas would be much obliged.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top