Function Sequence Error

In LO Base:
Version: (x64)
Build ID: 144abb84a525d8e30c9dbbefa69cbbf2d8d4ae3b
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

I have a macro launched by the event that the item status is changed on a listbox. Early on (immediately after defining all variables), I have:


Intending to force what is selected to be stored before anything else takes place.

That line keeps throwing:

BASIC runtime error.
An exception occurred
Message: Function sequence error…

Anyone know why this is happening or what I can do to avoid it?

Is it possible that you are trying to interact with this component on your form before LIBRE completes initialization of your form? Libre gives many false triggers at load/initialization of a form. You want to just ignore all of these and wait until you are sure that Libre has finished with it housekeeping stuff. I put an invisible dummy text box on all of my forms and set it to activate LAST (Form->Activation Order). So, after i get the event that this textbox has been activated…then i set a global variable maybe something like this

global LibreIsDoneWithAllOfItsJunk as boolean

Then any event routines or functions in my macros all start with this statement:

if NOT(libreIsDoneWithAllOfItsJunk) then exit sub

Code works for me without issue using:
Version: / LibreOffice Community
Build ID: a69ca51ded25f3eefd52d7bf9a5fad8c90b87951
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

I very much doubt that. Before the control that launches this macro is even enabled, the user has to go through several cascading listboxes.

I just found my problem and fixed it. The form of the launching listbox was a subform of a query form. Once I changed that, it started working. :flushed: