starDesktop.terminate does not terminate/close Libre Office

I have an “Exit” button on my Libre Office 6.x Switchboard that calls the following macro (the_Exit):-

Sub the_Exit
REM      Close the switchboard
  call close_Switchboard() 
REM      Wait a bit
  wait 400
REM      Terminate LO
End Sub

This works fine on LO x64/Windows 8.1 Pro
In LO OSX 10.13.1 the Switchboard closes, BUT LO is still left running.

What can be done to make LO close down programmatically on the above Mac.

Upgraded to LO for Mac (Version:
Build ID: 86daf60bf00efa86ad547e59e09d6bb77c699acb), but problem still exists.

[Solved] Had an error (not syntax) in my coding and the error message-box was being hidden behind my Switchboard.
All working now.