Bug 151796 - Microsoft Excel macro goes down a cell at end of Sub. Libreoffice does not unless you modify the code
Summary: Microsoft Excel macro goes down a cell at end of Sub. Libreoffice does not un...
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
7.3.6.2 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-27 23:47 UTC by Lee
Modified: 2023-09-30 03:18 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
spreadsheet with example of results (12.21 KB, application/zip)
2022-10-27 23:48 UTC, Lee
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lee 2022-10-27 23:47:33 UTC
Description:
Microsoft Excel macro goes down a cell at end of Sub. Libreoffice does not unless you modify the code.

Steps to Reproduce:
1. Write program using MS Excel
2. Run program in Libreoffice Calc
3. Notice that the next cell is not set at end of program.

Actual Results:
the active cell is not moved down by one cell. I have to modify code with a very simple workaround.

Expected Results:
My workaround works.


Reproducible: Always


User Profile Reset: No

Additional Info:
There is a trivial workaround. 

I would be happy to upload the file that I prepared.

Here is the computer code that explains the trivial workaround, but also shows a possible bug. It is found in the module "Private Sub Worksheet_Change(ByVal Target As Range)" near the bottom.

        ' USE EITHER LINE MS_EXCEL_1 OR LINE LIBREOFFICE_1. ONLY ALLOW ONE TO RUN, NOT BOTH.
        ' MS_EXCEL_1 LINE
        ' BELOW LINE IS USED IN MICROSOFT EXCEL VERSION.
        ' Range(strCell_Being_Moved_To).Select ' THIS IS MS_EXCEL_1 LINE
        
        ' LIBREOFFICE_1 LINE
        ' BELOW LINE IS TO BE USED IN LIBREOFFICE VERSION.
        ActiveCell.Offset(1, 0).Select ' THIS IS LIBREOFFICE_1 LINE

The problem is that the "MS_EXCEL_1" line works properly in Excel but not in Calc.

I have to comment out the "MS_EXCEL_1" line and uncomment out the "LIBREOFFICE_1" line in order for the focus to go to the next line down.

I am happy with the workaround that I created.

Thanks
Comment 1 Lee 2022-10-27 23:48:59 UTC
Created attachment 183306 [details]
spreadsheet with example of results
Comment 2 raal 2022-11-12 21:21:15 UTC
Your test file is not working for me. When I type number in column A, nothing happens.
Comment 3 Buovjaga 2023-03-02 09:08:01 UTC
Lee: please explain how we are to test this. The file contains no binding to events.

After copying a number from MASSIVE_BARCODE_EXPORT to PHYSICAL_INVENTORY, I tried to manually run the macro COPY_COUNT_OVER_TO_WORKSHEET_FOR_EXPORT, but I got:

BASIC runtime error.
'1'
An exception occurred 
Type: com.sun.star.container.NoSuchElementException
Message: at /usr/src/debug/libreoffice-fresh/libreoffice-7.5.0.3/sc/source/ui/unoobj/docuno.cxx:4021.

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the information.
Comment 4 QA Administrators 2023-08-30 03:06:09 UTC Comment hidden (obsolete)
Comment 5 QA Administrators 2023-09-30 03:18:03 UTC
Dear Lee,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp