
You can use this API method to disconnect a workbook from the server or to trigger a restart to the system.
To call the method, use Application.Run and specify the following input parameters:
True: With this value, the system will be restarted.
False: With this value, the system will not be restarted.
Dim lResult As Long
lResult= Application.Run("SAPLogOff", True )
If you you execute this command, the workbook connection to the system is restarted.