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).
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)
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.
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
Crossref: Bug 102078 prevents to provide more details.
(In reply to Tobias Burnus from comment #4) > Crossref: Bug 102078 prevents to provide more details. Should have been bug 114932.
Created attachment 139019 [details] 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-x86@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).
(In reply to Tobias Burnus from comment #6) > => 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"...) 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
Eike, the document Tobias Burnus gave in comment 6 has two functions. Which of the two functions did you run from the dialog?
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.
sorry, my comment 8 was not for Eike. I got confused with other bug report. It's for Buovjaga(comment 7)
(In reply to himajin100000 from comment #8) > Eike, the document Tobias Burnus gave in comment 6 has two functions. Which > of the two functions did you run from the dialog? I see, I think I originally ran the wrong one and not the one named "Run". I do get the same error as Tobias, if running "Run" now. Arch Linux 64-bit Version: 6.3.0.0.alpha0+ Build ID: 9059457a1a8385cb80b5dd2c797cee77af4222a9 CPU threads: 8; OS: Linux 4.19; UI render: default; VCL: gtk3_kde5; Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US Calc: threaded Built on 30 November 2018
Dear Tobias Burnus, 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 https://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 MassPing-UntouchedBug
Smaller reproducer: Option VBASupport 1 Sub Run() colNo = "H" MsgBox(colNo) MsgBox(Len(colNo)) MsgBox(colNo.Chars(0)) End Sub like himajin100000@gmail.com stated in comment 9. So strings are missing the chars function.
In my opinion, there is no error here. The col parameter at the time of calling the getColNum function is of type Variant/String. Variables of this type cannot be used in constructs like col.Chars(0). In Excel VBA, this construction will also lead to an error at runtime. In this particular case, this does not happen due to the length of the col parameter being equal to 1.