
Problem with CreateObject("Scripting.FileSystemObject")
2 reasons why this might happen:
1. You don't have scrrun.dll on your machine which si where filesystemobject
is implemented
2. You have not set your security settings in IE to allow the scripting of
unsafe objects
--
Regards
Andrew Clinick
Microsoft Scripting Program Manager
http://msdn.microsoft.com/scripting
Quote:
>I created a form on a webpage having drop-down menu control. And I want to
>add item in this control by reading a text file. When this script is
>running, it gives me error as following:
>Component can't create object 'CreateObject'
><script language="vbscript">
><!--
> set Qform=document.QueryForm
> sub window_onload()
> 'Initialize Street type
> Const ForReading = 1
> Dim fs, f, StreetName
> Set fs = CreateObject("Scripting.FileSystemObject")
> Set f = fs.OpenTextFile("c:\temp\street.txt", ForReading,
TristateFalse)
> Do While f.AtEndofStream <> True
> StreetName = f.ReadLine
> f.StName.additem StreetName
> Qform.street.additem StreetName
> Loop
> f.close
> end sub
>-->
></script>
>Any ideas?