I have a trouble with this little subroutine in VBA (see file script attached)
I have tested it first in real VBA environment and works ok.
In MS I do get an error.
----- Macro Scheduler--------
Microsoft VBScript Compilation error: 1025
Expected end of statement
Line 37, Colum 16
VBStart
Sub WriteBin()
Dim FileName
Dim Testvar
Dim FileNo
FileName = "Q:\test.bin"
Testvar = 4
FileNo = FreeFile
Open FileName For Binary Lock Read Write As #FileNo
Put #FileNo, , Testvar
Close #FileNo
End Sub
VBEnd
Vbrun>WriteBin
- What I do wrong?
- Do you have any guideline how to vrite VBScript code?
often I have to find tricks to make it working

Thanks
Massimo