Bug Hunting Session
Bug 52603 - Excel Visual Basic compatibility issue in LibreOffice Calc: "Application.ScreenUpdating = False" does not work!
Summary: Excel Visual Basic compatibility issue in LibreOffice Calc: "Application.Scre...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Macro-VBA
  Show dependency treegraph
Reported: 2012-07-27 19:58 UTC by Tor24_1975314
Modified: 2019-07-30 03:15 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:

Excel test file with macro (38.00 KB, application/vnd.ms-excel)
2012-07-27 19:58 UTC, Tor24_1975314

Note You need to log in before you can comment on or make changes to this bug.
Description Tor24_1975314 2012-07-27 19:58:51 UTC
Created attachment 64805 [details]
Excel test file with macro

The Excel Visual Basic code "Application.ScreenUpdating = False" does not work or will be ignored.
Because this code will be ignored it is not possible to disable the updating of the screen and some macros are working very slow in LibreOffice!

Try to run the example macro in Excel and compare it with LibreOffice Calc.
Example macro:

Sub Test_ScreenUpdating()
    ' Testing Excel VBA Code in Libre Office:
    Application.ScreenUpdating = False

    For i = 1 To 10000
        ActiveCell.Offset(1, 0).Select
    Next i
    Application.ScreenUpdating = True
End Sub
Comment 1 Tor24_1975314 2012-09-02 11:45:57 UTC
This bug occurs in LibreOffice version 3.5.6 and 3.6.1 also
Comment 2 Julien Nabet 2014-02-09 16:22:24 UTC
On pc Debian x86-64 with master sources updated yesterday, I can reproduce this.

Noel: I checked on Opengrok, a setScreenUpdating method exists but is never called, see:
See also:
Are we near the goal with all this?
Comment 3 Tor24_1975314 2014-02-18 18:49:30 UTC
This bug was also reproduced in newer versions of LibreOffice for Windows! 
Tested with LibreOffice versions:, and

Moreover to that the last version of LibreOffice shows a significant performance degradation to scroll down through cells via macro!!!

Needed time to scroll down through 10000 cells:
LibreOffice 00:15 [mm:ss]
LibreOffice 00:15 [mm:ss]
LibreOffice 01:38 [mm:ss] (!!!)

Needed time with Excel to compare:
Excel 2010 with "Application.ScreenUpdating = False": ~00:01 [mm:ss]
Excel 2010 with "Application.ScreenUpdating = True" :  00:05 [mm:ss]

(Test system: Windows 7 64-bit, Intel Core2Duo P8700 2.53 Ghz, 4 GB RAM, Java SE Runtime Environment build 1.6.0_24-b07)

Could anybody reproduce the bug and the performance degradation in LibreOffice 4.2.0?
Comment 4 Tor24_1975314 2014-05-04 14:48:13 UTC
This bug was reproduced also in LibreOffice Calc version and rc!
Comment 5 QA Administrators 2015-06-08 14:41:26 UTC Comment hidden (obsolete)
Comment 6 Tor24_1975314 2015-06-15 21:43:02 UTC
The problem still exists!

This bug was also reproduced in LibreOffice!
Comment 7 Julien Nabet 2015-06-17 17:19:29 UTC
I searched a bit and all the mechanism for this seems to be there, here's a bt when I'm on "ScreenUpdating=false"

(gdb) bt
#0  0x00002aaaca2c5ae1 in ScModelObj::lockControllers() (this=0x29c1920) at /home/julien/compile-libreoffice/libreoffice/sc/source/ui/unoobj/docuno.cxx:1652
#1  0x00002aaaae1d86c7 in basic::vba::(anonymous namespace)::lclLockControllers(com::sun::star::uno::Reference<com::sun::star::frame::XModel> const&, bool) (rxModel=uno::Reference to (ScModelObj *) 0x29c19b0, bLockControllers=true) at /home/julien/compile-libreoffice/libreoffice/basic/source/basmgr/vbahelper.cxx:110
#2  0x00002aaaae1d8b05 in basic::vba::(anonymous namespace)::lclIterateDocuments(basic::vba::(anonymous namespace)::ModifyDocumentFunc, com::sun::star::uno::Reference<com::sun::star::frame::XModel> const&, bool) (pModifyDocumentFunc=0x2aaaae1d8685 <basic::vba::(anonymous namespace)::lclLockControllers(com::sun::star::uno::Reference<com::sun::star::frame::XModel> const&, bool)>, rxModel=uno::Reference to (ScModelObj *) 0x29c19b0, bModificator=true)
    at /home/julien/compile-libreoffice/libreoffice/basic/source/basmgr/vbahelper.cxx:164
#3  0x00002aaaae1d8c18 in basic::vba::lockControllersOfAllDocuments(com::sun::star::uno::Reference<com::sun::star::frame::XModel> const&, bool) (rxModel=uno::Reference to (ScModelObj *) 0x29c19b0, bLockControllers=true) at /home/julien/compile-libreoffice/libreoffice/basic/source/basmgr/vbahelper.cxx:187
#4  0x00002aaacfaf5f15 in VbaApplicationBase::setScreenUpdating(unsigned char) (this=0x2e79030, bUpdate=0 '\000')
    at /home/julien/compile-libreoffice/libreoffice/vbahelper/source/vbahelper/vbaapplicationbase.cxx:193

Eike: any idea why the document view locking mechanism doesn't work here?
Comment 8 Tor24_1975314 2016-06-26 14:29:36 UTC
This problem still exists and was reproduced in LibreOffice versions,, and for Windows.

(Test system: Windows 7 64-bit, Intel Core2Duo P8700 2.53 Ghz, 4 GB RAM, Java SE Runtime Environment build 1.6.0_24-b07)
Comment 9 Xisco Faulí 2017-06-12 11:53:55 UTC
Changing version back to the earliest affected version.
Comment 10 Tor24_1975314 2017-11-05 20:48:07 UTC
Bug also reproduced with LibreOffice version 5.4.2 (Version for Windows)
Comment 11 QA Administrators 2019-07-30 03:15:41 UTC
Dear Tor24_1975314,

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 with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

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) from 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: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

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

Warm Regards,
QA Team