Error reported on a blank line

2019-09-16 15:17发布

I am truly stumped this afternoon and have done quite a bit of searching to no avail. I am getting the error

"Object doesn't support this property or method /admin/Upload1_20120508JB.asp, line 91"

From the following code:

        90 wf = fso2.CreateTextFile(sWriteFilePath)
        91 
        92 If fso1.FileExists(sReadFilePath) Then ...

Line 91 is blank and Line 90 works as expected, the file gets created in the proper location. Has anyone seen anything like this before? If so, what was the solution?

Thanks!

1条回答
聊天终结者
2楼-- · 2019-09-16 15:45

You must use Set, when you assign an object to a variable.

(see here to realize that today is a bad day for this feature of VBScript.)

查看更多
登录 后发表回答