REM ***** BASIC ***** sub closeDoc ThisComponent.close(True) end sub Sub closing msgbox "closing" End Sub sub closed msgbox "closed" end sub