Expected: End of Statement

I hope that I'm not posting this in the wrong forum. I am getting this error thrown when my page is executing some vbscript. The script is actually built and written to the page from the code of the asp .net page. When the code isn't written (as is sometimes the case), the page work correctly. However, when the code is written (through a response.write) the error occurs (which is a pretty good argument for the problem being within the script). It points to a line that is meaningless, which apparently is par for the course. I'll post the script below, in the hopes that someone can spot the problem.

<script language="vbscript">
Sub mReportViewer_ActiveX_LoadCompleted()
Dim arv
Set arv = document.all("mReportViewer_ActiveX")
arv.Printer.PaperSize = 5
End Sub
</script>
[843 byte] By [Broodmdh] at [2007-11-20 11:18:08]
# 1 Re: Expected: End of Statement
This script looks fine.
I think that the issue is with the calling function.
This seems to be an event handler, how did you register it?
hspc at 2007-11-8 0:43:15 >