Excel/VBS DIM MyFSO error
Can someone tell me why I get this error?
It will run from excel/vbs macro but not a standalone from 'Send To' menu.
Sub Add_Reference()
Application.VBE.ActiveVBProject.References.AddFrom File "C:\Windows\System32\scrrun.dll"
'Add a reference
End Sub
Sub CheckFileExist()
Dim MyFSO As FileSystemObject
Set MyFSO = New FileSystemObject
If MyFSO.FileExists("C:\temp\text.txt") Then
MsgBox "The File Exists"
Else
MsgBox "The File Does Not Exist"
End If
End Sub
'error line 9 char 12 ; expected end of statement
'code 800A0401
|