PC Review


Reply
Thread Tools Rate Thread

Calendar Control 8.0 question

 
 
Robert Crandal
Guest
Posts: n/a
 
      20th Nov 2009
Is it possible to restrict the date ranges of the Calendar
Control 8.0?? I only want the year 2009 to be selected
from the drop down box.

Thank you!


 
Reply With Quote
 
 
 
 
Mike Fogleman
Guest
Posts: n/a
 
      21st Nov 2009
You can't change what is in the drop-down for years, but you can limit the
year to 2009 on the calendar even if they select another year from the
drop-down. Put the following code in the Worksheet code module that your
calendar is on.

Private Sub Calendar1_NewYear()
Calendar1.Year = 2009
End Sub


Mike F

"Robert Crandal" <(E-Mail Removed)> wrote in message
news:loDNm.45264$(E-Mail Removed)...
> Is it possible to restrict the date ranges of the Calendar
> Control 8.0?? I only want the year 2009 to be selected
> from the drop down box.
>
> Thank you!
>
>



 
Reply With Quote
 
Robert Crandal
Guest
Posts: n/a
 
      21st Nov 2009
Thank you! That code works great. Just what I'm looking for!

"Mike Fogleman" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> You can't change what is in the drop-down for years, but you can limit the
> year to 2009 on the calendar even if they select another year from the
> drop-down. Put the following code in the Worksheet code module that your
> calendar is on.
>
> Private Sub Calendar1_NewYear()
> Calendar1.Year = 2009
> End Sub
>
>


 
Reply With Quote
 
Robert Crandal
Guest
Posts: n/a
 
      23rd Nov 2009
Hi again Mike. I just had another follow-up question....

Do you know if I can limit the calendar to only a couple
years?? For example, what if I wanted to limit it
to 2009 AND 2010 AND 2011?? How would the
code look then??


"Mike Fogleman" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> You can't change what is in the drop-down for years, but you can limit the
> year to 2009 on the calendar even if they select another year from the
> drop-down. Put the following code in the Worksheet code module that your
> calendar is on.
>
> Private Sub Calendar1_NewYear()
> Calendar1.Year = 2009
> End Sub
>


 
Reply With Quote
 
Mike Fogleman
Guest
Posts: n/a
 
      23rd Nov 2009
Private Sub Calendar1_AfterUpdate()
If Calendar1.Year > 2011 Then Calendar1.Year = 2011
If Calendar1.Year < 2009 Then Calendar1.Year = 2009
End Sub

Mike F
"Robert Crandal" <(E-Mail Removed)> wrote in message
news:L9rOm.63909$(E-Mail Removed)...
> Hi again Mike. I just had another follow-up question....
>
> Do you know if I can limit the calendar to only a couple
> years?? For example, what if I wanted to limit it
> to 2009 AND 2010 AND 2011?? How would the
> code look then??
>
>
> "Mike Fogleman" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>>
>> You can't change what is in the drop-down for years, but you can limit
>> the year to 2009 on the calendar even if they select another year from
>> the drop-down. Put the following code in the Worksheet code module that
>> your calendar is on.
>>
>> Private Sub Calendar1_NewYear()
>> Calendar1.Year = 2009
>> End Sub
>>

>



 
Reply With Quote
 
Robert Crandal
Guest
Posts: n/a
 
      25th Nov 2009
Ugghhh..... Guess what Mike? I can't use Calendar Control 8.0 at
work. I can only use Microsoft Date & Time Picker 6.0.

Do you know how to do this same thing with MS DT Picker 6.0?
I tried the following code below, but it doesnt seem to work:

Private Sub DTPicker1_AfterUpdate()
If DTPicker1.Year > 2011 Then DTPicker1.Year = 2011
If DTPicker1.Year < 2009 Then DTPicker1.Year = 2009
End Sub

Maybe I forgot to initialize something??

Thanks sooooooo much for your help!

"Mike Fogleman" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Private Sub Calendar1_AfterUpdate()
> If Calendar1.Year > 2011 Then Calendar1.Year = 2011
> If Calendar1.Year < 2009 Then Calendar1.Year = 2009
> End Sub
>
> Mike F


 
Reply With Quote
 
Mike Fogleman
Guest
Posts: n/a
 
      25th Nov 2009
Select the DTPicker, select Design mode, and in the property settings, set
the Max date & Min Date.

Mike F
"Robert Crandal" <(E-Mail Removed)> wrote in message
news:wl7Pm.11192$(E-Mail Removed)...
> Ugghhh..... Guess what Mike? I can't use Calendar Control 8.0 at
> work. I can only use Microsoft Date & Time Picker 6.0.
>
> Do you know how to do this same thing with MS DT Picker 6.0?
> I tried the following code below, but it doesnt seem to work:
>
> Private Sub DTPicker1_AfterUpdate()
> If DTPicker1.Year > 2011 Then DTPicker1.Year = 2011
> If DTPicker1.Year < 2009 Then DTPicker1.Year = 2009
> End Sub
>
> Maybe I forgot to initialize something??
>
> Thanks sooooooo much for your help!
>
> "Mike Fogleman" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Private Sub Calendar1_AfterUpdate()
>> If Calendar1.Year > 2011 Then Calendar1.Year = 2011
>> If Calendar1.Year < 2009 Then Calendar1.Year = 2009
>> End Sub
>>
>> Mike F

>



 
Reply With Quote
 
Robert Crandal
Guest
Posts: n/a
 
      25th Nov 2009
Thanks for the awesome advice Mike!

"Mike Fogleman" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>
> Select the DTPicker, select Design mode, and in the property settings, set
> the Max date & Min Date.
>
> Mike F


 
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
Calendar Control Question JamesJ Microsoft Access Forms 5 11th May 2008 08:44 PM
question on .net calendar control =?Utf-8?B?UGF1bA==?= Microsoft ASP .NET 3 27th Jan 2006 09:36 PM
Calendar Control Question Manoj Paramu Das Microsoft Dot NET 2 28th Jan 2005 03:56 PM
Calendar Control question =?Utf-8?B?RXZhbg==?= Microsoft Access 2 8th Aug 2004 07:54 PM
Calendar Control Question Randy Fritz Microsoft Access Form Coding 1 9th Mar 2004 02:30 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:58 PM.