Home All Groups Group Topic Archive Search About

Monthview control - run time 380 invalid property value

Author
1 Feb 2006 7:35 PM
KSH
I have an application that has been running out in the field for quite a
while.  It uses the Monthview control.  It is all of a sudden failing and
coming up with this error when the calendar should be displayed.  I used
Monthview so that I didn't need to distribute any active x controls, so I
don't think something needs to be re-registered.  It is funny, it seems to
have happened around the first of the year.  Could there be an expiration on
it?

Any input would be appreciated.

Thanks,

Kerry

--
KSH

Author
1 Feb 2006 8:05 PM
Ken Halter
Show quote Hide quote
"KSH" <K**@discussions.microsoft.com> wrote in message
news:CEF035C0-7F6C-4897-ABC3-7DEB2252EED9@microsoft.com...
>I have an application that has been running out in the field for quite a
> while.  It uses the Monthview control.  It is all of a sudden failing and
> coming up with this error when the calendar should be displayed.  I used
> Monthview so that I didn't need to distribute any active x controls, so I
> don't think something needs to be re-registered.  It is funny, it seems to
> have happened around the first of the year.  Could there be an expiration
> on
> it?
>
> Any input would be appreciated.
>
> Thanks,
>
> Kerry
>
> --
> KSH

You should have an error trap there to tell you exactly which property is
raising the error. It can be any property that does internal range checking
and there's no way for us to know without more details.

--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Freeware 4 color Gradient Frame? http://www.vbsight.com/GradFrameCTL.htm
Author
1 Feb 2006 8:49 PM
KSH
It is the month property.  I am actually setting it from a date coming off an
external chip.  But even if I hard code "02" for the month, it still comes up
with the error.  If I hard code a "03" for the month it has no problem.  It
seems to be February.

Thanks Ken,
KSH


Show quoteHide quote
"Ken Halter" wrote:

> "KSH" <K**@discussions.microsoft.com> wrote in message
> news:CEF035C0-7F6C-4897-ABC3-7DEB2252EED9@microsoft.com...
> >I have an application that has been running out in the field for quite a
> > while.  It uses the Monthview control.  It is all of a sudden failing and
> > coming up with this error when the calendar should be displayed.  I used
> > Monthview so that I didn't need to distribute any active x controls, so I
> > don't think something needs to be re-registered.  It is funny, it seems to
> > have happened around the first of the year.  Could there be an expiration
> > on
> > it?
> >
> > Any input would be appreciated.
> >
> > Thanks,
> >
> > Kerry
> >
> > --
> > KSH
>
> You should have an error trap there to tell you exactly which property is
> raising the error. It can be any property that does internal range checking
> and there's no way for us to know without more details.
>
> --
> Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
> DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
> Freeware 4 color Gradient Frame? http://www.vbsight.com/GradFrameCTL.htm
>
>
>
Author
2 Feb 2006 1:56 AM
MikeD
"KSH" <K**@discussions.microsoft.com> wrote in message
news:7665C421-6C82-4F39-9F80-FFD45CFD2A94@microsoft.com...
> It is the month property.  I am actually setting it from a date coming off
> an
> external chip.  But even if I hard code "02" for the month, it still comes
> up
> with the error.  If I hard code a "03" for the month it has no problem.
> It
> seems to be February.


What is the Day property? My guess would be it's 29, 30, or 31....all of
which would be invalid for February of this year (since there's only 28 days
in Feb this year).

If you're setting the Value property to a date and then just changing the
Month property (and it sounds like this is what you're doing), this could be
the cause.  For example, you're setting Value to 01/31/2006. No problem
there. But then try to set Month to 2 will indeed raise this error.  Here's
code to prove it.

Private Sub Form_Click()

    MonthView1.Month = 2

End Sub

Private Sub Form_Load()

    MonthView1.Value = DateSerial(2006, 1, 31)

End Sub