I am trying to add some desktop icons for a WIN98 PC. Each of these would be used to copy an individual file to a network folder, where I could then access the file from a different PC. I have tried the code below but keep getting an error message with the following info:
Error message:
The error seems to be related to “handler”. I have similar code that works with Excel, but I am wanting the desktop icons instead. As it is pretty obvious, I am not familiar with VBScipt.
Here is my code:
Any help and/or fixits would be appreciated.
Thanks,
Bill
Error message:
Code:
Line: 4
Char: 15
Error: Syntax Error
Code: 800A03EA
Source: Microsoft VBScript Compilation Error
The error seems to be related to “handler”. I have similar code that works with Excel, but I am wanting the desktop icons instead. As it is pretty obvious, I am not familiar with VBScipt.
Here is my code:
Code:
Sub SendJobBreakdownFileToClientPayrollDropFolder
Application.DisplayAlerts = False
Dim SourceFile, DestinationFile
On Error GoTo handler
SourceFile = "G:\WIM\JobBrkdn.dat"
DestinationFile = "R:\ClientPayrollDropFolder\JobBrkdn.dat"
FileCopy SourceFile, DestinationFile
REM Exit Sub ‘<< --Out of place also?
handler: MsgBox "Did not send properly."
Wscript.Echo "Sent"
End sub
Any help and/or fixits would be appreciated.
Thanks,
Bill