Click to See Complete Forum and Search --> : Object Variable Not Set


John K.
03-26-2000, 01:42 AM
Set fs = server.CreateObject("Scripting.FileSystemObject")
Set folder = fs.GetFolder("d:\pictures")
Set fc = folder.Files
ReDim sFiler(fc.count)
For Each f in folder.files
if readfile(f.path, stext, nlen) = 1 then nAntal = nAntal + 1:
sFiler(nAntal) = sfile
Next

Does anyone know what's wrong with the code?
I get the error: Object Variable Not Set

Goud
03-28-2000, 07:20 AM
To my best of my knowledge u r trying to use the sfile ( i.e., sFiler(nAntal)
= sfile)variable without assinging a value to it...Goud..


"John K." <john.k@home.se> wrote:
>Set fs = server.CreateObject("Scripting.FileSystemObject")
>Set folder = fs.GetFolder("d:\pictures")
>Set fc = folder.Files
>ReDim sFiler(fc.count)
>For Each f in folder.files
>if readfile(f.path, stext, nlen) = 1 then nAntal = nAntal + 1:
>sFiler(nAntal) = sfile
>Next
>
>Does anyone know what's wrong with the code?
>I get the error: Object Variable Not Set
>
>