• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 410
  • Last Modified:

How can I grey out specific dates in a Calendar Control within a VBA User Form?

I've got a user form with a calendar control that comes with Excel (as described in http://www.ozgrid.com/VBA/excel-calendar-dates.htm or http://www.fontstuff.com/vba/vbatut07.htm)

Is there someway I can grey out an arbitrary number of dates in the calendar so they are not selectable?
0
jnash67
Asked:
jnash67
1 Solution
 
zorvek (Kevin Jones)ConsultantCommented:
No, that control does not support disabling specific dates and I don't know one that does.

I believe your best course of action is to use the Click event handler for the control and check the selected date. If not valid then display a message or set the date to the nearest valid date.

Kevin
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now