| Ken Halter 2006-04-26, 6:56 pm |
| "Bookreader" <Bookreader127@yahoo.com> wrote in message
news:qggv42ld7hq58sba7ik4q4a8518nlifqv0@
4ax.com...
> When this code gets to the line
> varLinksSearched.Add strLink
> I get an error that says
> Object variable or with variable not set
>
> varLinksSearched is defined as a global collection as follows.
>
> Please tell me what I am doing incorrectly.
Where's the 'Set varLinksSearched = New Collection' ?
You can even do something like....
Public varLinksSearched As New Collection
....and it'll be instantiated "on demand". There's excessive overhead
involved though so I always choose to Declare and Instantiate on two lines.
btw... imo, you should always explicitly declare scope whenever possible. In
the Declarations section, that would mean declaring everything as either
Private or Public... "Dim", by itself, leaves alot to be desired.... as far
as readability is concerned.
--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
|