Graph.AddEvent
Adds event code from the specified file to the document.
SVB Example
Adding a document-level event to a graph:
Option Base 1 Option Explicit Sub Main 'Whenever the graph is right clicked on, 'a Henon Strange Attractor will appear ActiveGraph.AddEvent(Path & _ "\Examples\Macros\Graph Examples\Henon Strange Attractor.svb") ActiveGraph.EventCode = ActiveGraph.EventCode & vbCrLf & _ "Private Sub Document_BeforeRightClick(ByVal Where As Long, Cancel As Boolean)" & _ vbCrLf & "main" & vbCrLf & "End Sub" ActiveGraph.RunEvent End Sub
Copyright © 2020. Cloud Software Group, Inc. All Rights Reserved.