This documentation is archived and is not being maintained.

WorkbookEvents_BeforeSaveEventHandler Delegate 

A Delegate type used to add an event handler for the BeforeSave event. The BeforeSave event occurs before the workbook is saved.

Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in

Sub Sub1(SaveAsUI As Boolean, _
	Cancel As Boolean)
End Sub
Dim workbookEvents_BeforeSaveEventHandler1 As New WorkbookEvents_BeforeSaveEventHandler(AddressOf Sub1)

public delegate Void WorkbookEvents_BeforeSaveEventHandler(
	Boolean SaveAsUI, 
	&Boolean Cancel
public delegate void WorkbookEvents_BeforeSaveEventHandler(
	/*in*/boolean SaveAsUI, 
	/*in*/boolean Cancel
In JScript, you can use the delegates in the .NET Framework, but you cannot define your own.



True if the Save As dialog box will be displayed.


False when the event occurs. If the event procedure sets this argument to True, the workbook isn't saved when the procedure is finished.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms