I am having problems with the following FSO code. Firstly it was not recognising the FileSystemOBject but this was curred by Referencing the Microsoft Sripting RunTime Library. I now get the an Auotmation Error
Run-time error '-2147023782(8007045a)'
A dynamic link library (DLL) initialization routine failed
at the line
Set fso=CreateObject"Scripting.FileSystemObject")
Dim fso As Scripting.FileSystemObject
Dim cf As Folder
Dim fsoFolder As Folder
Dim fsoFiles As File
Dim strPath As String
strPath = "D:\Scanned Files\NewFolder"
MsgBox strPath
Set fso = CreateObject("Scripting.FileSystemObject")
Set cf = fso.CreateFolder(strPath)
Do I need to reference antoher DLL as I cannot find 'CreateObject' in the Object Browser? or am I missing something else?
Run-time error '-2147023782(8007045a)'
A dynamic link library (DLL) initialization routine failed
at the line
Set fso=CreateObject"Scripting.FileSystemObject")
Dim fso As Scripting.FileSystemObject
Dim cf As Folder
Dim fsoFolder As Folder
Dim fsoFiles As File
Dim strPath As String
strPath = "D:\Scanned Files\NewFolder"
MsgBox strPath
Set fso = CreateObject("Scripting.FileSystemObject")
Set cf = fso.CreateFolder(strPath)
Do I need to reference antoher DLL as I cannot find 'CreateObject' in the Object Browser? or am I missing something else?