Report.EventCode
Returns/sets the event code of a document.
| Syntax | Parameters | Return/assignment value |
|---|---|---|
| - | - | String |
SVB Example
Adding event code to a report:
Option Base 1
Option Explicit
Sub Main
Dim rpt As New Report
'the new report will run the Eta-Tran example whenever you right click on it.
rpt.AddEvent(Path & _
"\Examples\Macros\Analysis Examples\Eta-Tran.svb")
rpt.EventCode = rpt.EventCode & vbCrLf & _
"Private Sub Document_BeforeRightClick(where As Integer, Cancel As Boolean)" & _
vbCrLf & "main" & vbCrLf & "End Sub"
rpt.RunEvent
rpt.Visible = True
End Sub