If oFSO.FolderExists(stRep) Then
For Each oF1 In oFSO.GetFolder(stRep).Files
objReport.WriteLine(oF1.Name)
Next
End If
objReport.Close()
End Sub
Private Sub SetAttr(ByVal p1 As Object)
Throw New NotImplementedException
End Sub
End Class
=================================
The goal is to create a .txt file and append it if it already exists. I'm working in VB 2010. However, the bolded line is giving me trouble. I've received the following message at runtime....
Operator '=' is not defined for 'Nothing' and type 'FileSystemObject'.
Any ideas on how to address this? I will keep doing research, but would appreciate feedback!
Robert
ASPVisual Basic.NET
Last Comment
Nasir Razzaq
8/22/2022 - Mon
Rgonzo1971
Hi,
Did you check the reference?
Shouldn't it be
SetAttr(Set oFSO = CreateObject("Scripting.FileSystemObject"))
go on the safe side and do
Set oFSO = CreateObject("Scripting.FileSystemObject")
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
Did you check the reference?
Shouldn't it be
SetAttr(Set oFSO = CreateObject("Scripting.Fi
go on the safe side and do
Set oFSO = CreateObject("Scripting.Fi
SetAttr oFSO
Regards