Sorry, I have been using VBA for too long. You do not need a sub open
statement and end statement with
vb script. Here is what you put in
the file:
Dim objXL
Dim fso
Dim strFile
Set objXL = CreateObject("Excel.Application")
Set fso = CreateObject("Scripting.FileSystemObject")
strFile = InputBox("Address and file name")
If fileSystem.FileExists(strFile) Then
objXL.Workbooks.Open("c:\excel\MySpreadsheet.xls")
Else
objXL.Workbooks.Add()
End if