LibreOffice: com::sun::star::script::vba::VBAScriptEventId Constant Group Reference

LibreOffice LibreOffice 7.1 SDK API Reference

Variables
com::sun::star::script::vba::VBAScriptEventId Constant Group Reference

Identifies a VBA script event fired via XVBACompatibility::broadcastVBAScriptEvent(), and received by XVBAScriptListener::notifyVBAScriptEvent(). More...

## Variables
const long | SCRIPT_STARTED = 0
| This event is fired when a VBA script in the current document has been started. More...
const long | SCRIPT_STOPPED = 1
| This event is fired when a VBA script in the current document stops running. More...
const long | INITIALIZE_USERFORM = 2
| This event is fired when a VBA script in the current document tries to instantiate a userform. More...

## Detailed Description

Identifies a VBA script event fired via XVBACompatibility::broadcastVBAScriptEvent(), and received by XVBAScriptListener::notifyVBAScriptEvent().

See also
  VBAScriptEvent
  XVBACompatibility
  XVBAScriptListener

## Variable Documentation

## ◆ INITIALIZE_USERFORM

const long INITIALIZE_USERFORM = 2

This event is fired when a VBA script in the current document tries to instantiate a userform.

The member VBAScriptEvent::ModuleName of the event object will contain the name of the userform module.

## ◆ SCRIPT_STARTED

const long SCRIPT_STARTED = 0

This event is fired when a VBA script in the current document has been started.

Several scripts may run simultaneously, e.g. when a running script triggers a document event that starts another script.

The number of running scripts can be obtained via XVBACompatibility::RunningVBAScripts. The number returned there will already contain the new script notified with this event.

The member VBAScriptEvent::ModuleName of the event object will contain the name of the code module that contains the started script.

## ◆ SCRIPT_STOPPED

const long SCRIPT_STOPPED = 1

This event is fired when a VBA script in the current document stops running.

Several scripts may run simultaneously, e.g. when a running script triggers a document event that starts another script.

The number of scripts still running can be obtained via XVBACompatibility::RunningVBAScripts. The number returned there will not contain the stopped script notified with this event anymore.

The member VBAScriptEvent::ModuleName of the event object will contain the name of the code module that contains the script that has been stopped.