Bug 58849 - Macros: VBA code - create automatically a new row - does not work in LibreOffice
Summary: Macros: VBA code - create automatically a new row - does not work in LibreOffice
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
3.6.4.3 release
Hardware: Other Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks: Macro-VBA
  Show dependency treegraph
 
Reported: 2012-12-29 05:39 UTC by luc
Modified: 2018-11-01 19:10 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
the spreadsheet with the VBA-code (20.50 KB, application/vnd.ms-excel)
2012-12-29 05:39 UTC, luc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description luc 2012-12-29 05:39:01 UTC
Created attachment 72233 [details]
the spreadsheet with the VBA-code

Problem description: 
Hi

In MS-Excel I ‘m using a spreadsheet with a VBA-code (which I did not create myself) whereby automatically a row is created under the row where data is inserted when, in column B, I insert whether “i” or “u” (without the brackets). The code is :


Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rij As Integer, Kolom As Integer
Dim Waarde As String

  Rij = Target.Row
  Kolom = Target.Column

  If Kolom = 2 Then
    Application.ScreenUpdating = False
    Waarde = UCase(Trim(Target.Value))
    If Waarde = "I" Or Waarde = "U" Then
       Application.CutCopyMode = False
       Rows(Rij & ":" & Rij).Select
       Selection.Copy
       Selection.Insert Shift:=xlDown
       Rows(Rij + 1 & ":" & Rij + 1).Select
       Selection.PasteSpecial Paste:=xlPasteAllExceptBorders, Operation:=xlNone, _
           SkipBlanks:=False, Transpose:=False
       Selection.ClearContents
       Range("C" & Rij).Select
       Application.CutCopyMode = True
    End If
    Application.ScreenUpdating = True
  End If

(Some translations because the code is in Dutch : "Rij" = Row / "Kolom" = Column / "Waarde" = Value)

The reason for this code :

- always leave two rows open/blank between the row where data is being inserted and the sum/total of the columns F and G

- lowering the sum/totals in F and G automatically so I don’t have to create a row manually (“Insert Row”) to maintain two open/blank rows.

In LibreOffice this VBA-code works almost. (first the security for macro’s has to be set to low via extra/libreoffice/security).

When I insert “i” or u” the new row is created underneath but all the inserted data (a date in column A and “i” or “u” in column B) is deleted.

I already mentioned this problem to the developers at Novel Gooo and the were about to fix it but then this project was discontinued.

For me solving this problem is absolutely necessary to abandon MS.

Does anyone has a solution ?

Thx
Steps to reproduce:
1. ....
2. ....
3. ....

Current behavior:

Expected behavior:

              
Operating System: Windows XP
Version: 3.6.4.3 release
Comment 1 Michel Rudelle 2013-01-22 12:35:12 UTC
Hi,
I reproduce with the attached file:
The behavior does not complies with what we have with Excel 2003
Checked with:
Version 3.6.4.3 (Build ID: 2ef5aff) - Vista
Microsoft Excel 2003 SP3 - Vista

Notice that with LibreOffice 4.0.0.1, we obtain a better result:
The data is no more deleted
The only difference I noticed is that the format is not reproduced on the row inserted.
Checked with:
Version 4.0.0.1 (Build ID: 527dba6f6e0cfbbc71bd6e7b88a52699bb48799) - Vista
Comment 2 QA Administrators 2015-02-19 15:46:24 UTC Comment hidden (obsolete)
Comment 3 Buovjaga 2015-03-08 18:55:53 UTC
Confirmed loss of formatting (Date) in A4 after row insertion through macro.

Win 7 Pro 64-bit, LibO Version: 4.4.1.2
Build ID: 45e2de17089c24a1fa810c8f975a7171ba4cd432
Locale: fi_FI
Comment 4 tommy27 2016-04-16 07:27:13 UTC Comment hidden (obsolete)
Comment 5 QA Administrators 2017-05-22 13:23:52 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present on a currently supported version of LibreOffice 
(5.2.7 or 5.3.3  https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the version of LibreOffice and 
your operating system, and any changes you see in the bug behavior
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave 
a short comment that includes your version of LibreOffice and Operating System

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3)

http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to "inherited from OOo";
4b. If the bug was not present in 3.3 - add "regression" to keyword


Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug-20170522