Object Variable Not Set


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Object Variable Not Set

  1. #1
    John K. Guest

    Object Variable Not Set

    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



  2. #2
    Goud Guest

    Re: Object Variable Not Set


    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
    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center