Discussion:
[Libreoffice-bugs] [Bug 102078] New: Excel XLSM import with VBA: calling function fails with bogus "Object variable not set"
b***@bugs.documentfoundation.org
2016-09-12 14:03:13 UTC
Permalink
https://bugs.documentfoundation.org/show_bug.cgi?id=102078

Bug ID: 102078
Summary: Excel XLSM import with VBA: calling function fails
with bogus "Object variable not set"
Product: LibreOffice
Version: 5.2.1.2 rc
Hardware: All
OS: All
Status: UNCONFIRMED
Keywords: filter:xlsx
Severity: normal
Priority: medium
Component: Calc
Assignee: libreoffice-***@lists.freedesktop.org
Reporter: ***@physik.fu-berlin.de

Issue related to the same file as bug 102075, namely attachment 127275
[details] [Excel XLSM file (XLS with macros)]

If one changes the "Sub Auswerten()" to use the lines after "'LO:" instead of
the lines after "'MSO" - and then tries to run it, it fails with the odd error
message:

BASIC runtime error.
'91'
Object variable not set.


It stops at the line:
Function getColNum(col, offset) As String

If one sets the break point there and hovers over "col" and "offset", LO shows:
"col=<missing parameter>" and "offset=<missing parameter>"

The caller is:

colNo2 = getColNum(colNo2, deltaCol)

and hovering over the LHS shows: "colNo2=H" and on the RHS: "colNo2=H" and
"deltaCol=3". If one now clicks "Step into", hovering over "offset" shows
"offset=3" but hovering over "col" doesn't show any tool tip. Clicking "Step
into" again, shows the error message from above.


Expected:
The function call works, passing successfully the string argument (and the
numeric argument).
--
You are receiving this mail because:
You are the assignee for the bug.
b***@bugs.documentfoundation.org
2016-10-08 10:28:46 UTC
Permalink
https://bugs.documentfoundation.org/show_bug.cgi?id=102078

Buovjaga <***@suomi24.fi> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@suomi24.fi

--- Comment #1 from Buovjaga <***@suomi24.fi> ---
I don't get the error message.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.3.0.0.alpha0+
Build ID: ff2a399b61f34f7920e594e8cbb6c19045b24956
CPU Threads: 8; OS Version: Linux 4.7; UI Render: default;
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on October 7th 2016

Changes:

Do While True
'LO: (untested)
If "" = Sheets("Zeiten").Range(colNo2 & "6").Value Then Exit Do
'MSO:
'If Evaluate("EXACT(Zeiten!" & colNo2 & "6,"""")") Then Exit Do
'n_WF = n_WF + 1
'colNo2 = getColNum(colNo2, deltaCol)
Loop

Do While True
cnt = cnt + 1
'LO: (untested)
If "" = Sheets("Zeiten").Range(colNo2 & "6").Value Then Exit Do
'MSO:
'If Evaluate("EXACT(Zeiten!" & colNo & "6,"""")") Then Exit Do

Rem Geseglte Zeit je Wettfahrt
sh_name = "GesZeit_WF" & cnt
'LO: (untested)
If Sheets.hasByName(hasByName) Then Sheets(sh_name).Delete
'MSO:
'If Evaluate("ISREF('" & sh_name & "'!A1)") Then Sheets(sh_name).Delete
'Sheets.Add After:=Sheets(Sheets.Count)
'Sheets(Sheets.Count).Name = sh_name
'Set sht = Sheets(sh_name)
--
You are receiving this mail because:
You are the assignee for the bug.
b***@bugs.documentfoundation.org
2017-04-04 17:53:01 UTC
Permalink
https://bugs.documentfoundation.org/show_bug.cgi?id=102078

Carlos <***@gmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEEDINFO
Ever confirmed|0 |1

--- Comment #2 from Carlos <***@gmail.com> ---
Unfortunately without clear steps to reproduce it, we cannot track down the
origin of the problem.
Please provide a clearer set of step-by-step instructions on how to reproduce
the problem.

I have set the bug's status to 'NEEDINFO'. Please change it back to
'UNCONFIRMED' once the requested information is provided.
--
You are receiving this mail because:
You are the assignee for the bug.
b***@bugs.documentfoundation.org
2017-07-02 19:36:28 UTC
Permalink
https://bugs.documentfoundation.org/show_bug.cgi?id=102078

Yousuf Philips (jay) <***@hotmail.com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Blocks| |108908


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=108908
[Bug 108908] [META] Visual Basic for Applications (VBA) issues
--
You are receiving this mail because:
You are the assignee for the bug.
b***@bugs.documentfoundation.org
2018-01-02 10:14:59 UTC
Permalink
https://bugs.documentfoundation.org/show_bug.cgi?id=102078

--- Comment #3 from QA Administrators <qa-***@libreoffice.org> ---
Dear Bug Submitter,

This bug has been in NEEDINFO status with no change for at least
6 months. Please provide the requested information as soon as
possible and mark the bug as UNCONFIRMED. Due to regular bug
tracker maintenance, if the bug is still in NEEDINFO status with
no change in 30 days the QA team will close the bug as INSUFFICIENTDATA
due to lack of needed information.

For more information about our NEEDINFO policy please read the
wiki located here:
https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/NEEDINFO

If you have already provided the requested information, please
mark the bug as UNCONFIRMED so that the QA team knows that the
bug is ready to be confirmed.

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

Warm Regards,
QA Team

MassPing-NeedInfo-Ping-20180102
--
You are receiving this mail because:
You are the assignee for the bug.
b***@bugs.documentfoundation.org
2018-01-09 14:53:07 UTC
Permalink
https://bugs.documentfoundation.org/show_bug.cgi?id=102078

Tobias Burnus <***@physik.fu-berlin.de> changed:

What |Removed |Added
----------------------------------------------------------------------------
Depends on| |114932


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=114932
[Bug 114932] [FILEOPEN, REGRESSION] Excel XLSM import with VBA: LO 6rc1 freezes
during startup / or crashes
--
You are receiving this mail because:
You are the assignee for the bug.
b***@bugs.documentfoundation.org
2018-01-09 14:54:23 UTC
Permalink
https://bugs.documentfoundation.org/show_bug.cgi?id=102078

--- Comment #4 from Tobias Burnus <***@physik.fu-berlin.de> ---
Crossref: Bug 102078 prevents to provide more details.
--
You are receiving this mail because:
You are the assignee for the bug.
b***@bugs.documentfoundation.org
2018-01-09 14:55:11 UTC
Permalink
https://bugs.documentfoundation.org/show_bug.cgi?id=102078

--- Comment #5 from Tobias Burnus <***@physik.fu-berlin.de> ---
(In reply to Tobias Burnus from comment #4)
Post by b***@bugs.documentfoundation.org
Crossref: Bug 102078 prevents to provide more details.
Should have been bug 114932.
--
You are receiving this mail because:
You are the assignee for the bug.
b***@bugs.documentfoundation.org
2018-01-10 14:15:41 UTC
Permalink
https://bugs.documentfoundation.org/show_bug.cgi?id=102078

--- Comment #6 from Tobias Burnus <***@physik.fu-berlin.de> ---
Created attachment 139019
--> https://bugs.documentfoundation.org/attachment.cgi?id=139019&action=edit
test.xlsm file (created with MSO Excel 2007)

New test case with simplified macros

* In MSO Excel, opening the file, enabling macros and clicking "Run" will show
a "K" in cell A4.

In LO (both 6.0rc1 and 6.1.0.0.alpha0+, Build ID:
0074951704022d173a5fdb9df933f47be1dcbb91 TinderBox: Win-***@42):

[First, Enable macros]

(A) Clicking "Run" seemingly doesn't do anything.

(B) Running the macro directly:
Tools | Macros > Run Macros ...
"test.xlsm" -> VBAProject -> Module1 -> "Run" [Run]
=> This shows a dialog with:
"Error" "BASIC runtime error. '91' Object variable not set.' [OK]"
and stops in line 3 in the source code ("Function getColNum"...)

In the debugger, one sees (line 22) that the arguments' variables have the
proper values "H" and 3, respectively).
--
You are receiving this mail because:
You are the assignee for the bug.
b***@bugs.documentfoundation.org
2018-01-13 21:40:36 UTC
Permalink
https://bugs.documentfoundation.org/show_bug.cgi?id=102078
Bug 102078 depends on bug 114932, which changed state.

Bug 114932 Summary: CRASH: Read-only file crashes executing the macro (steps in comment 3)
https://bugs.documentfoundation.org/show_bug.cgi?id=114932

What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--
You are receiving this mail because:
You are the assignee for the bug.
b***@bugs.documentfoundation.org
2018-01-14 14:44:30 UTC
Permalink
https://bugs.documentfoundation.org/show_bug.cgi?id=102078

Buovjaga <***@suomi24.fi> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW

--- Comment #7 from Buovjaga <***@suomi24.fi> ---
(In reply to Tobias Burnus from comment #6)
Post by b***@bugs.documentfoundation.org
"Error" "BASIC runtime error. '91' Object variable not set.' [OK]"
and stops in line 3 in the source code ("Function getColNum"...)
I get the error, pointing to line 4:
BASIC runtime error.
'449'
Argument is not optional.

What could be the cause? Setting to NEW in any case, but hopefully Tobias can
shed more light on this.

Arch Linux 64-bit
Version: 6.1.0.0.alpha0+
Build ID: ef22c4a0a99be5d2903fb9e9d09fc852cd791173
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4;
Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded
Built on January 12th 2018
--
You are receiving this mail because:
You are the assignee for the bug.
b***@bugs.documentfoundation.org
2018-12-10 22:47:41 UTC
Permalink
https://bugs.documentfoundation.org/show_bug.cgi?id=102078

--- Comment #8 from ***@gmail.com ---
Eike, the document Tobias Burnus gave in comment 6 has two functions. Which of
the two functions did you run from the dialog?
--
You are receiving this mail because:
You are the assignee for the bug.
b***@bugs.documentfoundation.org
2018-12-11 03:50:03 UTC
Permalink
https://bugs.documentfoundation.org/show_bug.cgi?id=102078

--- Comment #9 from ***@gmail.com ---
I commented-out the lines

colPre = col.Chars(1)
colNo = col.Chars(0)

,thinking String type in StarBasic does not have Chars property.

and I started Run() function, which later calls the other function
getColNum(col,offset), and I was able to end the macro without errors, if I
don't mind the result.
--
You are receiving this mail because:
You are the assignee for the bug.
Loading...