Error reported on a blank line

喜欢而已 提交于 2019-12-25 06:40:54

问题


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:


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



来源:https://stackoverflow.com/questions/10727047/error-reported-on-a-blank-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!