BeforeOpenFile Event

<< Click to Display Table of Contents >>

Navigation:  Events Generated by the ActiveX >

BeforeOpenFile Event

Previous pageReturn to chapter overviewNext page

Is fired when the user clicked the Open File button in the toolbar (or pushed the corresponding key).

BeforeOpenFile(

Cancel as Boolean

)

Cancel

is a return-parameter, i.e. you can assign it one of the following values to control the resulting action of VPE:

Value

Description

False

continue operation

True

cancel the event, i.e. deny that the file open dialog will be shown. Cancelling the operation allows you to display your own open dialog and to import or create your own document, for example from a database via a memory stream.

Example:

Protected Sub vpe_BeforeOpenFile (Cancel as Boolean)

 Cancel = True

End Sub

 

See also:

OpenFileName