Eg. Excel's workbook event, BeforeClose, defined in VBA as:
Private Sub Workbook_BeforeClose( Cancel As Boolean)
Cancel is False when the event occurs. If the event procedure sets this argument to True, the close operation stops and the workbook is left open.
So the parameter "Cancel" needs to be passed by reference in order for the handler to pass back a value in it. Can you do that in AHK with:
Code: Select all
class Workbook_Events
{
BeforeClose(ByRef cancel, wkb)
{
cancel := True ; Prevent the workbook from closing.
}
}
Many thanks for any help in advance!