PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
New WINDEV 23 feature!
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Runs the closing process of an office control and displays its confirmation dialog if necessary.
Example
// Click the VALIDATE button
IF not ControlExecuteClosing(PSHEET_Spreadsheet) THEN
RETURN
END
Close()
Syntax
<Result> = ControlExecuteClosing(<Office Control>)
<Result>: Boolean
  • If the closing process of control returns a value (True or False), <Result> corresponds to this value.
  • If the closing process of control returns no value:
    • if ..Modified on the control is set to True, a confirmation dialog is displayed: <Result> is set to False if the user asks not to close the document, True otherwise.
    • if ..Modified on the control is set to False, the function returns True.
<Office Control>: Control name
Name of office control to use. This control can correspond to:
  • a Spreadsheet control,
  • a Word Processing control,
  • an Image Editor control,
  • a PDF Reader control.
Remarks
  • This function is automatically called by the ribbon of office controls (Spreadsheet, Word Processing, Image Editor or PDF Reader controls) on the following user actions:
    • New.
    • Open.
    • Drag and Drop a document to the control.
  • This function performs the following operations:
    • Running the "Before closing the document" process.
    • If this process returns a value (True or False), the function stops and returns this value.
    • If this process returns no value:
      • if ..Modified on the control is set to True, the function displays a confirmation dialog to the user and it returns False if the user asks not to close the document.
      • if ..Modified on the control is set to False, the function returns True.
  • This function can be called for example when closing a window or before a new content is assigned to the control.
  • The following code allows you to display the confirmation dialog only:
    bCloseOK = AAFExecute(PSHEET_Spreadsheet, aafClosingDialog)
  • The following code allows you to run the closing code of document only:
    ExecuteProcess(PSHEET_Spreadsheet, trtBeforeClosingDocument)
Components
WINDEVReports and Queries wd230obj.dll
Minimum required version
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment