I'm pulling my hair out here.

I have an ASP page which causes an error when loading.

The error is...
***************************
Error Type:
Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method
/intranet/default.asp, line 66
***************************

The procedure causing the problem in the default.asp page is
******************************************
Sub GetEvents()
Dim oApp, clsD, vCls, clsE
Dim sEvents

Set oApp = Server.CreateObject("Calendar.clsApplication")
Set vCls = oApp.GetCalendarMonth(Year(Date()), Month(Date()), vbMonday)
For Each clsD In vCls
If clsD.TodaysDate = Date Then
If clsD.DoesDayHaveEvents Then
For Each clsE In clsD
%>
<li><a
href="EventDefault.asp?app=Calendar%20Events"><%=clsE.Title%></a></li>
<%
Next
End If
End If
Next

'we will always have the last link
%>
<li><a href="EventDefault.asp?app=Calendar%20Events">Click here to view
the calendar</a></li>
<%

Set clsD = Nothing
Set vCls = Nothing
Set oApp = Nothing

End Sub
******************************************
The actual error line (Line 66) is the line that says:-
For Each clsD In vCls

This code actually works on our intranet and another developers machine, but
does not work on my system (the main development machine) when I run
//localhost/intranet/default.asp.

When I comment out this routine, it does run.

Does anyone have any ideas?

Thx

Re: HELP!!!!!!!!!! by tlviewer

tlviewer
Thu Mar 10 08:59:39 CST 2005


"Billy" <Billy@discussions.microsoft.com> wrote in message =
news:4931C653-2393-4280-9370-4197F9C225CB@microsoft.com...
> I'm pulling my hair out here.
>=20
> I have an ASP page which causes an error when loading.
>=20
> The error is...
> ***************************
> Error Type:
> Microsoft VBScript runtime (0x800A01B6)
> Object doesn't support this property or method
> /intranet/default.asp, line 66
> ***************************
>=20
> The procedure causing the problem in the default.asp page is
> ******************************************
> Sub GetEvents()
> Dim oApp, clsD, vCls, clsE
> Dim sEvents
> =20
> Set oApp =3D Server.CreateObject("Calendar.clsApplication")

This ProgID, Calendar.clsApplication, must be a custom VB object
(I can tell by the cls prefix). Make sure that its registered properly
on the offending machine.

hth,
tlviewer

Re: HELP!!!!!!!!!! by Joe

Joe
Thu Mar 10 09:31:48 CST 2005

"tlviewer" <tlviewerSHRUB@yahooCHENEY.com> wrote in message
news:uUZZ9GYJFHA.1176@TK2MSFTNGP12.phx.gbl...

"Billy" <Billy@discussions.microsoft.com> wrote in message
news:4931C653-2393-4280-9370-4197F9C225CB@microsoft.com...
> I'm pulling my hair out here.
>
> I have an ASP page which causes an error when loading.
>
> The error is...
> ***************************
> Error Type:
> Microsoft VBScript runtime (0x800A01B6)
> Object doesn't support this property or method
> /intranet/default.asp, line 66
> ***************************
>
> The procedure causing the problem in the default.asp page is
> ******************************************
> Sub GetEvents()
> Dim oApp, clsD, vCls, clsE
> Dim sEvents
>
> Set oApp = Server.CreateObject("Calendar.clsApplication")

This ProgID, Calendar.clsApplication, must be a custom VB object
(I can tell by the cls prefix). Make sure that its registered properly
on the offending machine.

hth,
tlviewer

You could be right although I'd have thought that in that case the line before
would have failed. Maybe it's a different version on the failing machine, one
not supporting the NewEnum for that collection?


--

Joe (MVP)