Calc macro workbook open

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
OldManMac
Posts: 2
Joined: Fri Jun 30, 2017 11:17 pm

Calc macro workbook open

Post by OldManMac »

I created a workbook in Excell 2016 that runs a macro when the workbook is opened. I converted that workbook to OpenOffice 4.3.1 and it works fine. However, I recreated the workbook from scratch in OpenOffice and brought the macros from Excell into it. The macro that ran when the Excell workbook first opened is not working in the OpenOffice workbook when opened. How do I get a macro in VBA script to run when I open this new workbook? All the other macros in VBA script work as inteneded. I just need this one macro to run when the new Calc workbook opens. Please help!
OpenOffice 4.1 on Windows 10
User avatar
RoryOF
Moderator
Posts: 34610
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Calc macro workbook open

Post by RoryOF »

Different macro language, with some slight overlap into VBA compatibility. You need to rewrite.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
OldManMac
Posts: 2
Joined: Fri Jun 30, 2017 11:17 pm

Re: Calc macro workbook open

Post by OldManMac »

The converted workbook from Excell 2016 runs the VBA macro when I open it. So there is no problem with the script. I just want the new workbook to recognize that the macro should run when the new workbook opens.
OpenOffice 4.1 on Windows 10
User avatar
RoryOF
Moderator
Posts: 34610
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Calc macro workbook open

Post by RoryOF »

Discussion and suggestion in this thread
viewtopic.php?f=20&t=34914
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
Zizi64
Volunteer
Posts: 11358
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Calc macro workbook open

Post by Zizi64 »

The converted workbook from Excell 2016 runs the VBA macro when I open it.
It is depend on the type of the macrocode. The arithmetical functions, (calculation routines) will run without any problem. But the application-controlling routines and functions are not compatible. The VBA and the API of the AOO/LO are basicly different.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Post Reply