View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Lucas Swanson Lucas Swanson is offline
external usenet poster
 
Posts: 22
Default Custom Date Picker Control

A related problem that I have been having with creating my own custom
controls is that most controls do not seem to have any "GetFocus" or
"LoseFocus" events. Am I simply missing these somehow or do they actually not
exist?

"Lucas Swanson" wrote:

In a VBA userform, is there any way at all to change the background colour
of the portion a date and time picker control (DTPicker) that resembles a
combo box? Although this control appears to be inherited from the generic
MSForms.Control (or a derived class of it), it seems to have somehow
overridden the base class BackColor property with a private property or
something, causing this property to be innaccessible in the DTPicker control
class.


I am developing a form for entering data into Excel and for some of the
fields have dates as values. I really like the built-in date and time picker
control for this, except that I want to be able to change the background
colour of the part of the control that looks like a combo box. And that is
simply not possible with the standard date and time picker. How can I get
around this problem?

I have been trying to create a custom control to emulate the date and time
picker by combining a standard combo box with a hidden month view control
that becomes visible when the user presses the dropdown button of the command
box, but have been having a lot of trouble with this.

Another thing is, even if I select the DTPicker control and click on the
"send to back" button, the DTPicker still shows up on the form on top of any
other controls. The DTPicker is a nice and useful control to use for entering
dates, but it seems to lack some significant functionality that really should
be inherited from the basic control class.