PC Review


Reply
Thread Tools Rate Thread

Date Picker wil not be visible

 
 
JayDe
Guest
Posts: n/a
 
      11th Oct 2009
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
 
Reply With Quote
 
 
 
 
RB Smissaert
Guest
Posts: n/a
 
      11th Oct 2009
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" <(E-Mail Removed)> wrote in message
news:90B5A10A-A08B-4144-A97C-(E-Mail Removed)...
> 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


 
Reply With Quote
 
JayDe
Guest
Posts: n/a
 
      11th Oct 2009
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" <(E-Mail Removed)> wrote in message
> news:90B5A10A-A08B-4144-A97C-(E-Mail Removed)...
> > 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

>
>

 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      11th Oct 2009
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" <(E-Mail Removed)> wrote in message
news:90B5A10A-A08B-4144-A97C-(E-Mail Removed)...
> 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


 
Reply With Quote
 
RB Smissaert
Guest
Posts: n/a
 
      11th Oct 2009
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" <(E-Mail Removed)> wrote in message
news:E519DF49-FB13-4BC7-8813-(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
>> news:90B5A10A-A08B-4144-A97C-(E-Mail Removed)...
>> > 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

>>
>>


 
Reply With Quote
 
RB Smissaert
Guest
Posts: n/a
 
      11th Oct 2009
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" <(E-Mail Removed)> wrote in message
news:E519DF49-FB13-4BC7-8813-(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
>> news:90B5A10A-A08B-4144-A97C-(E-Mail Removed)...
>> > 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

>>
>>


 
Reply With Quote
 
JayDe
Guest
Posts: n/a
 
      12th Oct 2009
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" <(E-Mail Removed)> wrote in message
> news:E519DF49-FB13-4BC7-8813-(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> >> news:90B5A10A-A08B-4144-A97C-(E-Mail Removed)...
> >> > 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
> >>
> >>

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use Direct-X date picker to pick date range for query =?Utf-8?B?U2xhcHB5?= Microsoft Access Macros 2 27th Sep 2006 01:07 AM
I am trying to use the Microsoft Date and Time Picker control and I am getting the following error "an error occured in a call to the windows date and time picker control" in access 2000 Ralph Malph Microsoft Access Forms 0 25th Oct 2004 07:00 PM
Date time picker setting current date at creation eyad hasan Microsoft Outlook Form Programming 2 26th Mar 2004 04:11 PM
MS Date and Time Picker Control defaults to today's date =?Utf-8?B?UmF2aQ==?= Microsoft Outlook Form Programming 1 23rd Jan 2004 03:31 PM
MS Date and Time Picker Control defaults to today's date =?Utf-8?B?UmF2aQ==?= Microsoft Outlook Program Addins 0 14th Jan 2004 06:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:23 PM.