Created attachment 57916 [details] a test document with some examples MSO VBA can contain unmatched Sub or End Sub statements, these don't cause a clever compiler any problems if those procedures involved are never referenced or called. Unfortunately the Libreoffice basic compiler is quite dumb and it falls over any imported vba containing such strays.
fixed
Noel Power committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=24b402d67eb9acc7ff1f0afeee7237f6b3b14644 weed out unmatched Sub/End Sub statements when importing VBA fdo#46889
Noel Power committed a patch related to this issue. It has been pushed to "libreoffice-3-5": http://cgit.freedesktop.org/libreoffice/core/commit/?id=2edf8cba49e8ba72fa7b0e02d24a38cab45c697c&g=libreoffice-3-5 weed out unmatched Sub/End Sub statements when importing VBA fdo#46889 It will be available in LibreOffice 3.5.4.