Calc macro workbook open

Creating a macro - Writing a Script - Using the API

Calc macro workbook open

Postby OldManMac » Thu Aug 10, 2017 5:52 pm

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
OldManMac
 
Posts: 2
Joined: Fri Jun 30, 2017 11:17 pm

Re: Calc macro workbook open

Postby RoryOF » Thu Aug 10, 2017 5:54 pm

Different macro language, with some slight overlap into VBA compatibility. You need to rewrite.
Apache OpenOffice 4.1.4 on Xubuntu 16.04.03 (mostly 64 bit version) and infrequently on Win2K/XP
14 October 2016 was Pooh's 90th birthday
User avatar
RoryOF
Moderator
 
Posts: 25499
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Calc macro workbook open

Postby OldManMac » Thu Aug 10, 2017 5:58 pm

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
OldManMac
 
Posts: 2
Joined: Fri Jun 30, 2017 11:17 pm

Re: Calc macro workbook open

Postby RoryOF » Thu Aug 10, 2017 6:05 pm

Apache OpenOffice 4.1.4 on Xubuntu 16.04.03 (mostly 64 bit version) and infrequently on Win2K/XP
14 October 2016 was Pooh's 90th birthday
User avatar
RoryOF
Moderator
 
Posts: 25499
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Calc macro workbook open

Postby Zizi64 » Thu Aug 10, 2017 7:22 pm

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; LO4.4.7, LO5.3.7 on Win7x64Prof.
PortableApps, WinPenPack: LO3.3.0-LO5.4.2 and AOO4.1.3
Please, edit the topic's initial post, and add the word "[Solved]" at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 6067
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 13 guests