Ask Your Question
1

can not run excel macro-enabled file in LibreOffice spreadsheet

asked 2018-11-11 01:13:45 +0100

LFKim2018 gravatar image

I created a macro-enabled workbook in Excel and tried it on LibreOffice spreadsheet and it wouldn't run... is there anything I have to do or modify to make it run under LibreOffice spreadsheet? thank you..

edit retag flag offensive close merge delete

Comments

1

Please be more specific and provide details. What do you mean by wouldn't run? Is this LO security warning regarding Macros? Or you get an error message while executing the code? Normally, Excel VBA and OOo Basic codes are not compatible - quoting A. Pitonyak "The OOo macro language is similar to the one in Microsoft Office because they are both based on BASIC. Both macro languages access the underlying implementation structures, which differ significantly and are therefore incompatible."

SM_Riga gravatar imageSM_Riga ( 2018-11-11 09:34:44 +0100 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2018-11-11 10:43:41 +0100

LFKim2018 gravatar image

sorry for the vague statement. I try to attach the macro-enabled file but it is not allowed. so I am showing the sub below that is not functioning and no error message is displaying. ALSO kindly see the image - the sorting module prompted an error. is there a need to modify the codes? these are not happening in Excel. many thanks..

Sub Delete_Duplicates_in_NewSheet() Application.ScreenUpdating = False On Error Resume Next If (Worksheets("NewSheet").Name = "") Then MsgBox "[NewSheet] not found!", vbCritical Range("A2").Select Exit Sub End If Sheets("NewSheet").Select lastrow = Cells(Rows.Count, "A").End(xlUp).Row Set CS = Sheets("NewSheet")
CS.Range("A1:P" & lastrow).RemoveDuplicates _ Columns:=Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), Header:=xlYes Application.ScreenUpdating = True Application.DisplayAlerts = True On Error GoTo 0 Range("A2").Select End Sub

C:\fakepath\sorterror.jpg

edit flag offensive delete link more

Comments

Some remarks: 1. Please edit your question or use a comment section if any clarification is needed - see Guidelines for asking.Do not use an answer box for this purpose. 2. As stated ealier, MS Excel and LibreOffice/OpenOffice use different methods and properties so you need to adapt code for another party's software. This is definitely your case. 3. I have upvoted your question - you should be able to upload file now.

SM_Riga gravatar imageSM_Riga ( 2018-11-11 11:17:20 +0100 )edit

So please edit your question, add your file for inspection and it would be nice to explain expected Macro behavior - what the macro should do and what is the expected result. As Excel and LO differs, I can not be sure that I read and understand the VBA code correctly.

SM_Riga gravatar imageSM_Riga ( 2018-11-11 11:22:50 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-11-11 01:13:45 +0100

Seen: 49 times

Last updated: Nov 11