Dear all,

I need your help in FileSystem Object area.Eventhough I added the reference "Run time Script". VB is giving error in following code

Dim fso As New FileSystemObject
Set txtfile = fso.CreateTextFile("c:\testfile.txt", True)
MsgBox "Writing file"
txtfile.Write ("This is a test")
txtfile.Close


Error is pointing to the line which starts with "Set txtfile"(2 nd line).

Folllowing is error message

"A dynamic library Initialization routine failed"

I am working in VB 6.0 in windows xp system

Hope you can help me


thanks

gson