Which version of OpenOffice.org are you using?2.4.1
What Operating System (version) are you using?Win2K
I converted an Excel spreadsheet which contained macros which used the Application.EnableEvents feature of VBA.
The converted macros contained the following two lines at the start of the module:
Rem Attribute VBA_ModuleType=VBADocumentModule
Option VBASupport 1
The spreadsheet contained a control (button) which called one of the macros for a click event.
I tentatively mapped the mouse up event to the appropriate macro.
When attempting to interpret the macros, the following statement
Application.EnableEvents = False
results in an error dialog:
BASIC runtime error.
Property or method not found.
If I uncomment the "Attribute..." line,
I get the error dialog with the following:
BASIC syntax error.
Expected: Sub.
The dialog appears to be posted 4 separate times. I don't see any indication in the editor window of which line the error pertains to, although it is scrolled to the end of the module.
Can someone point me to a discussion of information on conversion of documents which use VBA globals such as the Application object?
Does OO BASIC mimic these VBA globals? My searches turned up empty.
Thanks for any pointers.
Application.EnableEvents undefined (converted Excel macros)
-
- Posts: 5
- Joined: Wed Jul 02, 2008 6:50 am
Re: Application.EnableEvents undefined (converted Excel macros)
I can't help personally but this is a very good reference for Macros and OOBasic.
Andrew Pitonyak's OpenOffice.org Macro Document, updated May 12, 2008.
Andrew Pitonyak's OpenOffice.org Macro Document, updated May 12, 2008.
Ubuntu 14.10 Utopic Unicorn, LibreOffice Version: 4.3.3.2
Gurkha Welfare Trust
Gurkha Welfare Trust
Re: Application.EnableEvents undefined (converted Excel macros)
VBA support may work with very trivial macros. A macro which needs to turn on and off event handlers is not trivial. Both office suits have a fundamentally different architecture. There is no equivalent to VBA's EnableEvents in this office suite.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
-
- Posts: 4
- Joined: Tue Nov 23, 2010 2:24 am
Re: Application.EnableEvents undefined (converted Excel macr
I have had difficulty finding code snippets for simple Excel VBA conversion to OO. I have created a web page for beginning OO developers who, like me, are having trouble finding code snippets. Check out this link =>http://sites.google.com/site/satuperail/home
OpenOffice.org 3.2.1 Linux (Ubuntu 10.10)