Page 1 of 1

Converting Excel macro code to Openoffice

Posted: Thu Jul 16, 2020 9:48 pm
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

Re: Converting Excel macro code to Openoffice

Posted: Fri Jul 17, 2020 6:36 am
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.