Start Event

The Start event is executed first whenever a Control or Scripted component is calculated. It is a good place to set initialization variables, open files for reading or writing, and so on. In Automatic Calculation mode, the Start event will be triggered as soon as the component is visible in the Mathcad window.

In this sample, the object is a slider control and its appearance and initial settings are being programmed in the Start event.

Example

Sub SliderEvent_Start( )

Slider.MinRange = –10

Slider.MaxRange = 10

Slider.TickFrequency = 1

Slider.StaticEdge = False

Slider.ClientEdge = False

End Sub

The Start event has no parameters, unlike the Exec event. If you need to access worksheet variables from the Start event, use the Automation Interface.