Converting Excel macro code to Openoffice

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
MUTLEY-SYB
Posts: 1
Joined: Mon Jul 13, 2020 4:54 pm

Converting Excel macro code to Openoffice

Post by MUTLEY-SYB »

Hi Let me start by saying I am not a programmer. I am a 74 year old pensioner who created a spreadsheet in Excel some years ago and would like to be able to use it in Openoffice.
I have Java RE loaded and most of the macros, which I created with key strokes, work. Two of them however, start and then stop giving me an error message 423.

My computer is running under windows 10

1st Problem This is the code which works in Excel

Code: Select all

ActiveCell.FormulaR1C1 = "Practice Option"
    ActiveSheet.Shapes("AutoShape 819").Select
    Selection.ShapeRange.ZOrder msoSendToBack
    ActiveSheet.Shapes("AutoShape 652").Select
    Selection.ShapeRange.ZOrder msoSendToBack
    Range("DA75").Select

2nd Problem This is the code which works in Excel

Code: Select all

Range("DI61").Select
    ActiveSheet.PasteSpecial Format:=3, Link:=1, DisplayAsIcon:=False, _
        IconFileName:=False
    Range("DG62").Select

My apologies if I am not creating this in the correct format etc, I am brand new to this and have a lot to learn.

Many thanks to anyone who can help
Last edited by MrProgrammer on Tue Jul 21, 2020 8:35 pm, edited 2 times in total.
Reason: Added Code tags; Moved from Beginners forum to Macros and UNO API
OpenOffice 4.1.7 on Windows 10
User avatar
Zizi64
Volunteer
Posts: 11505
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Converting Excel macro code to Openoffice

Post by Zizi64 »

I am a 74 year old pensioner who created a spreadsheet in Excel some years ago and would like to be able to use it in Openoffice.
The MS VBA (the programming language and environment is not compatible with the StaBasic + API combination of the Apache OpenOffice.

You can try the LibreOffice. It has a littlebit higher compatibility with the VBA codes (when you use the compatibility options in the code).
But there is not a 100% compatibility level, therefore always better to rewrite your VBA macros based on the API functions.
(API: Application Programming Interface.)


Please upload the full VBA code embedded in a file. Then we will able to try it in the LibreOffice.
Please give us a detailed desctription: what you want to achieve with the macros.
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.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