You are currently reviewing an older revision of this page.
If I open “BuildingDesigner.xls” with LibreOffice Basic I get following error message:
"If outside of a procedure is invalid”
Why am I seeing this error message?
The error message from the screenshot shows how the “LibreOffice Basic” is called there, in other words, how it is called there is not compatible to VBA. However, the syntax of the VBA code is correct. The used conditional code:
#If VBA7 Then
‘..
#Else
#End If
It is used with MicroStation CONNECT Edition to recognize which version of VBA is used. E.g. VBA 7 is used with MSCONNECT Edition and supports 32 and 64 Bit, VBA 6 is used for 32 Bit only and used with MS V8i generation.
So LibreOffice Basic does not allow this conditional declaration because it is not completely compatible with VBA, which is how it is required in MicroStation and/or Microsoft Office.
As a workaround, the conditional declaration could be avoided by creating 2 different VBA files for each case, but there is no guarantee that it will work correctly in all areas.
From the MSCE Readme, the VBA components are required as described in readme here:
https://docs.bentley.com/LiveContent/content/en/MicroStation%20ReadMe-v6/GUID-637B20A8-F57B-4FD0-9B4E-628574844438
Note: LibreOffice Basic is not certified to be used with MicroStation, there for it is not certified on AECOsim Building Designer.
Enter methods to resolve in this section.