Bug 134487 - macros dont work as expected. calc crashes on running the macros in file
Summary: macros dont work as expected. calc crashes on running the macros in file
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
6.4.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: wantBacktrace
Depends on:
Blocks: Macro-VBA
  Show dependency treegraph
 
Reported: 2020-07-03 18:27 UTC by johnks
Modified: 2022-07-25 03:27 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
xlsm file with macro errors. download fresh file from google drive link (2.88 MB, application/vnd.ms-excel.sheet.macroEnabled.12)
2020-07-03 18:28 UTC, johnks
Details

Note You need to log in before you can comment on or make changes to this bug.
Description johnks 2020-07-03 18:27:32 UTC
Description:
i am attaching a copy of a simple invoicing excel sheet with macros. on first start up, the file shows 

BASIC syntax error.
Expected: ,.

then, there is a button on "home" sheet, "add business logo to invoices" that macro fails because the sheet has hardcoded "ActivePrinter:="Microsoft Print to PDF"" and it fails on that. removing that line, error that shows is 
"BASIC runtime error.
'423'
GetOpenFilename"

"fname = Application.GetOpenFilename(filefilter:="Images (*.jpg),*.jpg", Title:="Select Logo")" the code that shows the problem

the sheet has further problems like 
"BASIC runtime error.
'423'
RemoveDuplicates"


Steps to Reproduce:
1. open the file and try to work with buttons/forms

Actual Results:
https://drive.google.com/open?id=1D6b8CQu1ph9WDpSkxQIqwsUGlxeuEz19
download link to file 

https://www.youtube.com/watch?v=0jhN-i4vgpQ

link to video by the creator of the file showing the file working in excel but not in LO calc.

Expected Results:
the excel file should work as shown in the youtube video


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.4.2.2
Build ID: 4e471d8c02c9c90f512f7f9ead8875b57fcb1ec3
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: kf5; 
Locale: en-IN (en_IN.UTF-8); UI-Language: en-US
Calc: threaded
Comment 1 johnks 2020-07-03 18:28:23 UTC
Created attachment 162619 [details]
xlsm file with macro errors. download fresh file from google drive link
Comment 2 Xisco Faulí 2020-07-23 16:39:02 UTC
Reproduced in

Version: 7.1.0.0.alpha0+
Build ID: d8270636a57e7dc68ede51308c380e2098f765d7
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 3 Xisco Faulí 2020-07-23 16:47:07 UTC
Steps to reproduce:
1. Open attached document
2. Go to Home - click on 'Add bussiness logo on invoices' -> it fails in line 77
3. Remove line 77
4. Click on Run button.

-> Crash

@Mike, I thought you might be interested in this issue
Comment 4 QA Administrators 2022-07-25 03:27:21 UTC Comment hidden (spam)