ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Date Picker wil not be visible (https://www.excelbanter.com/excel-programming/434828-date-picker-wil-not-visible.html)

JayDe

Date Picker wil not be visible
 
Hi

I have a form with the Microsoft Date and Time Picker Control 6.0 (SP 6)

When I initilize the firm i have something like this in my code:

DateFrm.ValDate.Visible = False

and when the form is showing this control is of course not showing.

Later in my code I have this statement

DateFrm.ValDate.Visible = True

The problem is that the control is also not showing this time

Any idea of what can be the problem.

Regards
JayDe

RB Smissaert

Date Picker wil not be visible
 
After this line:
DateFrm.ValDate.Visible = True

Put this:
DoEvents

and see if that makes a difference

If not then do:
DateFrm.Repaint


RBS


"JayDe" wrote in message
...
Hi

I have a form with the Microsoft Date and Time Picker Control 6.0 (SP 6)

When I initilize the firm i have something like this in my code:

DateFrm.ValDate.Visible = False

and when the form is showing this control is of course not showing.

Later in my code I have this statement

DateFrm.ValDate.Visible = True

The problem is that the control is also not showing this time

Any idea of what can be the problem.

Regards
JayDe



JayDe

Date Picker wil not be visible
 
Sorry

This did not solve the problem.

The funny thing is that I am showing and hiding many controls, but the
datepicker is the only one that is not showing. The only difference is that
the datepicker is an "Additional Control"


JayDe


"RB Smissaert" wrote:

After this line:
DateFrm.ValDate.Visible = True

Put this:
DoEvents

and see if that makes a difference

If not then do:
DateFrm.Repaint


RBS


"JayDe" wrote in message
...
Hi

I have a form with the Microsoft Date and Time Picker Control 6.0 (SP 6)

When I initilize the firm i have something like this in my code:

DateFrm.ValDate.Visible = False

and when the form is showing this control is of course not showing.

Later in my code I have this statement

DateFrm.ValDate.Visible = True

The problem is that the control is also not showing this time

Any idea of what can be the problem.

Regards
JayDe




Rick Rothstein

Date Picker wil not be visible
 
I get the same problem (I'm using XL2003 SP3 on Vista SP1). Here is a work
around that you can use (at least until someone comes up with a better
method) where I have used a CommandButton Click event to represent the
showing of the control later on in your code...

Dim DatePickerLeft As Long

Private Sub CommandButton1_Click()
DateFrm.ValDate.Left = DatePickerLeft
End Sub

Private Sub UserForm_Initialize()
DatePickerLeft = DateFrm.ValDate.Left
DateFrm.ValDate.Left = 2 * Me.Width
End Sub

Note the DatePickerLeft variable is declared outside of any procedure...
this makes the variable "global" to the UserForm. The concept is to move the
control out of view (off the visible part of the UserForm) when the UserForm
initializes and to move it back into its design time position when you want
the user to see it again. If you want to remove it from view later on in
your code, just set the Left property as I did in the Initialize event to
move it out of view again.

--
Rick (MVP - Excel)


"JayDe" wrote in message
...
Hi

I have a form with the Microsoft Date and Time Picker Control 6.0 (SP 6)

When I initilize the firm i have something like this in my code:

DateFrm.ValDate.Visible = False

and when the form is showing this control is of course not showing.

Later in my code I have this statement

DateFrm.ValDate.Visible = True

The problem is that the control is also not showing this time

Any idea of what can be the problem.

Regards
JayDe



RB Smissaert

Date Picker wil not be visible
 
Another option might be to put the datepicker on a frame exactly the same
size as the datepicker (or a bit bigger if you want)
and make the frame visible and not visible. The datepicker itself is always
visible and that property will never be altered.

RBS


"JayDe" wrote in message
...
Sorry

This did not solve the problem.

The funny thing is that I am showing and hiding many controls, but the
datepicker is the only one that is not showing. The only difference is
that
the datepicker is an "Additional Control"


JayDe


"RB Smissaert" wrote:

After this line:
DateFrm.ValDate.Visible = True

Put this:
DoEvents

and see if that makes a difference

If not then do:
DateFrm.Repaint


RBS


"JayDe" wrote in message
...
Hi

I have a form with the Microsoft Date and Time Picker Control 6.0 (SP
6)

When I initilize the firm i have something like this in my code:

DateFrm.ValDate.Visible = False

and when the form is showing this control is of course not showing.

Later in my code I have this statement

DateFrm.ValDate.Visible = True

The problem is that the control is also not showing this time

Any idea of what can be the problem.

Regards
JayDe





RB Smissaert

Date Picker wil not be visible
 
Another option is to go with the MonthView control (SP6) that is in
MSCOMCT2.OCX.
This always worked fine for me and no problem with visibility.

RBS


"JayDe" wrote in message
...
Sorry

This did not solve the problem.

The funny thing is that I am showing and hiding many controls, but the
datepicker is the only one that is not showing. The only difference is
that
the datepicker is an "Additional Control"


JayDe


"RB Smissaert" wrote:

After this line:
DateFrm.ValDate.Visible = True

Put this:
DoEvents

and see if that makes a difference

If not then do:
DateFrm.Repaint


RBS


"JayDe" wrote in message
...
Hi

I have a form with the Microsoft Date and Time Picker Control 6.0 (SP
6)

When I initilize the firm i have something like this in my code:

DateFrm.ValDate.Visible = False

and when the form is showing this control is of course not showing.

Later in my code I have this statement

DateFrm.ValDate.Visible = True

The problem is that the control is also not showing this time

Any idea of what can be the problem.

Regards
JayDe





JayDe

Date Picker wil not be visible
 
I did it with the frame solution.

it was very simple to do and it worked perfect.

Thank you


Regards
JayDe

"RB Smissaert" wrote:

Another option might be to put the datepicker on a frame exactly the same
size as the datepicker (or a bit bigger if you want)
and make the frame visible and not visible. The datepicker itself is always
visible and that property will never be altered.

RBS


"JayDe" wrote in message
...
Sorry

This did not solve the problem.

The funny thing is that I am showing and hiding many controls, but the
datepicker is the only one that is not showing. The only difference is
that
the datepicker is an "Additional Control"


JayDe


"RB Smissaert" wrote:

After this line:
DateFrm.ValDate.Visible = True

Put this:
DoEvents

and see if that makes a difference

If not then do:
DateFrm.Repaint


RBS


"JayDe" wrote in message
...
Hi

I have a form with the Microsoft Date and Time Picker Control 6.0 (SP
6)

When I initilize the firm i have something like this in my code:

DateFrm.ValDate.Visible = False

and when the form is showing this control is of course not showing.

Later in my code I have this statement

DateFrm.ValDate.Visible = True

The problem is that the control is also not showing this time

Any idea of what can be the problem.

Regards
JayDe






All times are GMT +1. The time now is 07:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com