Bug 123144 - Unfriendly Error Message in VBASupport 1
Summary: Unfriendly Error Message in VBASupport 1
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
(earliest affected)
4.1 all versions
Hardware: All All
: medium enhancement
Assignee: Andreas Heinisch
Whiteboard: target:7.3.0
Depends on:
Blocks: Error-Messages
  Show dependency treegraph
Reported: 2019-02-03 16:28 UTC by himajin100000
Modified: 2021-09-20 05:57 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

document to be used for STR (9.04 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-02-03 16:29 UTC, himajin100000

Note You need to log in before you can comment on or make changes to this bug.
Description himajin100000 2019-02-03 16:28:49 UTC
see steps to reproduce

Steps to Reproduce:
1. Open the attached ods file
2. Run the Main1() in Module1
3. Run the Main2() in Module2

Actual Results:
Error Message on step 2 is:
BASIC runtime error.
Variable not defined.

Error Message on step 3 is:

BASIC runtime error.

Expected Results:
Error Message on step 3 should be:

BASIC runtime error.
Variable not defined.

Reproducible: Always

User Profile Reset: No

Additional Info:
It's easier for StarBasic programmer to find out what the error is.

Programmer may not find out the name of variable that causes the error so easily.

Source Code Pointer:


rMsg.isEmpty() is false in the following code
Comment 1 himajin100000 2019-02-03 16:29:56 UTC
Created attachment 148873 [details]
document to be used for STR
Comment 2 himajin100000 2019-02-03 16:30:34 UTC
Version: (x64)
Build ID: 573a473275ad7c76d0cada9b7e73d4923e7a79d5
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-02-03_01:22:10
Locale: ja-JP (ja_JP); UI-Language: en-US
Calc: threaded
Comment 3 Xisco Faulí 2019-03-14 17:34:45 UTC
Reproduced in

Build ID: c196d70337f6b755cfc4c34beda05554c6fab114
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded


Version (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 4 Andreas Heinisch 2021-09-15 17:13:15 UTC
As a workaround I would propose that we just append the message at the end. This would lead to something like:

Variable not defined: a
Comment 5 Commit Notification 2021-09-19 16:47:32 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":


tdf#123144 - Always translate an error number to a vba error message

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:

Affected users are encouraged to test the fix and report feedback.