Created attachment 87975 [details] example demonstrating problem Hi! Sorry for my English. LibreOffice-4.1.2.3 has trouble that not exist in previous versions (at least LibreOffice-4.0.4.2). Workbook of 2 sheets: "Sheet1" and "Sheet2". Cell "A1" of "Sheet1" contains value 42. Object's reference mySheet is messed after adding sheet. First MsgBox correctly reports value 42, but second don't. Option VBASupport 1 Option Explicit Dim mySheet Sub Main Set mySheet = Sheets("Sheet1") MsgBox("Before copy sheet: " + mySheet.Cells(1, 1).Value) Sheets("Sheet2").Copy Before:=Sheets("Sheet1") MsgBox("After copy sheet: " + mySheet.Cells(1, 1).Value) End Sub Code like above is from file generated by another program beyond our control. Attachment contains sample file. Try to run macro bug_demo.ods -> Standard -> Module1 -> Main.
*** This bug has been marked as a duplicate of bug 70079 ***