Macro Para Abrir Formulario Libreoffice Base Review

Before diving into the code, let’s understand the use case. By default, when you open a Base database ( .odb file), you are greeted with the main database window showing Tables, Queries, Forms, and Reports. While functional, this window is not user-friendly for non-technical users.

| Problem | Solution | | :--- | :--- | | | Check the form name spelling. Use exact case. Try getByName("FormName") | | Macro does nothing | Ensure the macro is stored inside the database document (not in "My Macros"). | | Security warning every time | Go to Tools → Options → LibreOffice → Security → Macro Security and set to "Medium". | | Form opens but database closes | Remove the line that sets ContainerWindow.Visible = False if you still need access to tables/queries. | macro para abrir formulario libreoffice base

Para abrir un formulario incrustado en tu base de datos, el método más directo y confiable utiliza la jerarquía FormDocuments . Copia y pega el siguiente código en tu editor de macros: Before diving into the code, let’s understand the use case

para que el programa te pregunte si deseas ejecutarlas al abrir el archivo. | Problem | Solution | | :--- |

The language used for macros in LibreOffice is , which is syntactically similar to Visual Basic for Applications (VBA) but with its own object model (UNO - Universal Network Objects).

Una vez en el editor de macros (que utiliza la interfaz de usuario de LibreOffice Basic, similar a Visual Basic para Aplicaciones), sigue estos pasos:

' Get the current database document context oDoc = ThisDatabaseDocument

Subir

Utilizamos cookies para asegurar que damos la mejor experiencia al usuario en nuestra web. Si sigues utilizando este sitio asumiremos que estás de acuerdo. Mas Información