Object no longer valid - TechRepublic
General discussion
November 26, 2001 at 10:09 PM
stuart.truman

Object no longer valid

by stuart.truman . Updated 23 years, 3 months ago

I wonder if you know why an object will become no longer valid in VB Script?

What I am doing is initially calling a function which will search through the all of the days that a person has had off. In this case we have one employee how has been off for nearly 1/4 of a yr. I know my function works as I have debugged it carefully and ensured all lines of the function are called at one stage or another.

However, when control returns to the calling code the system generates an error saying “Object no longer valid” and shows the line which contains the call to the function. for example :

startdate = getStartDate(EmpID, EndDate)

I have checked that all my variables are declared and correct and cannot understand why the system generates an error at this point.

I am not having any fun with this.

This discussion is locked

All Comments