Description: "BASIC runtime error. Object variable not set." thrown on second line of following Basic Function on initial file load: "Function getSheetNme() cntlr = ThisComponent.getCurrentController() getSheetNme = cntlr.getActiveSheet().getname() End Function" Steps to Reproduce: 1.create macro function as listed in description 2.enter call to function in cell A1 3.save and reload Actual Results: "BASIC runtime error. Object variable not set." Expected Results: "sheet1" or name of sheet where function called Reproducible: Always User Profile Reset: Yes Additional Info: -will attempt to attach a case test file(test.ods) testing: 1) loaded file under safe mode...same error result 2) no errors with 6.1.3.2 or before 3) error occur with 6.1.4.2, 6.1.5.2, 6.2.0.3 4) Confirmed: cell function is performed before "open" event is thrown 5) Excerpts from ask forum titled: "getActiveSheet error on initial file load" ********************************************************************** "....You are correct in getting the error on initial load. While: cntlr = ThisComponent.getCurrentController() creates no problem, the other statements using cntlr do generate the error on document load in v6.1.4 but not v6.1.3. Must be a new bug." User: Ratslinger ( Dec 20 '18 ) *********************************************************************** "@jaM Have now used MRI to try & isolate the problem further. ThisComponent is available but nothing after that until the sheet is completely loaded but it is confusing as to how it is seeing the cell function if it isn't completely loaded. Again this only in v6.1.4." User: Ratslinger ( Dec 20 '18 ) ********************************************************************** Env: Win10-64 Home ver1809 Build 17763 12GB Memory AMD A12-9700P RADEON R7, 10 COMPUTE CORES 4C+6G, 2500 Mhz, 4 Core(s)
Created attachment 149030 [details] case test file
i think this is a duplicate of issue: FILEOPEN: Error on creating getCurrentController().getActiveSheet() for basic script from location=document ? https://bugs.documentfoundation.org/show_bug.cgi?id=123005 *** This bug has been marked as a duplicate of bug 123005 ***