[Solved] Macro Not Working
-
- Posts: 4
- Joined: Fri Mar 23, 2018 6:00 pm
[Solved] Macro Not Working
Hi, I used to have Excel 2003 which is not compatible with Windows 10. I only used it for one Spreadsheet to keep an eye on my finances (which, due to my lack of expertise, took me ages to create). Now I opened it with OpenOfficeCalc, but unfortunately I can't run the macro any more. Could anyone have a look at it and tell me how I can make it work? Thanks.
Last edited by franklludwig on Sat Mar 24, 2018 12:42 pm, edited 1 time in total.
Open Office 4.1.4 on Windows 7
- Hagar Delest
- Moderator
- Posts: 32661
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: Macro Not Working
Hi and welcome to the forum!
Basically, it would help to post the code instead of a screenshot.
The macro language is different so you've to adapt it with the OpenOffice basic language.
Basically, it would help to post the code instead of a screenshot.
The macro language is different so you've to adapt it with the OpenOffice basic language.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
-
- Posts: 4
- Joined: Fri Mar 23, 2018 6:00 pm
Re: Macro Not Working
The code is:
(It appears the second part of it disappeared which looked dodgy to me, anyway.)
Code: Select all
Sub update()
'
' update Macro
' Macro recorded 14/04/2007 by Frank L. Ludwig
'
' Keyboard Shortcut: Ctrl+u
'
Range("J1").Select
Selection.Copy
Range("B1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Range("D3:D19").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("F3:F19").Select
Selection.ClearContents
End Sub
Last edited by robleyd on Sat Mar 24, 2018 9:34 am, edited 1 time in total.
Reason: Added Code tags
Reason: Added Code tags
Open Office 4.1.4 on Windows 7
Re: Macro Not Working
Tips:
- try the LibreOffice. It has a littlebit higher compatibility with the foreign file types and the VBA macros.
- use the "Option VBASupport 1" directive at the begin of the code in the Module.
- try to rewrite your macros based on the AOO/LO API using the StarBasic or an another supported programming language.
- try the LibreOffice. It has a littlebit higher compatibility with the foreign file types and the VBA macros.
- use the "Option VBASupport 1" directive at the begin of the code in the Module.
- try to rewrite your macros based on the AOO/LO API using the StarBasic or an another supported programming language.
Last edited by Zizi64 on Sat Mar 24, 2018 4:02 pm, edited 1 time in total.
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.
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.
-
- Posts: 4
- Joined: Fri Mar 23, 2018 6:00 pm
Re: Macro Not Working
Prior to posting here I had made several unsuccessful attempts to record a macro in the Open Office file. However, I tried it a few more times since and eventually succeeded.
Open Office 4.1.4 on Windows 7
Re: [Solved] Macro Not Working
Recording the macros is not an efficient method, because the macro recorder of the AOO/LO has a limited capability.
You must WRITE your macros based on the API functions of the AOO/LO.
(API: Application Programming Interface)
You must WRITE your macros based on the API functions of the AOO/LO.
(API: Application Programming Interface)
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.
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.
-
- Posts: 4
- Joined: Fri Mar 23, 2018 6:00 pm
Re: [Solved] Macro Not Working
I only use calculations for one spreadsheet with one simple macro, and I got it to work now. It may not be the most sophisticated solution, but it does the job
Open Office 4.1.4 on Windows 7