https://issues.apache.org/ooo/show_bug.cgi?id=124154
Bug ID: 124154 Issue Type: DEFECT Summary: REDIM fails with UBOUND or LBOUND of same array Product: App Dev Version: 4.0.1 Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: P3 Component: scripting Assignee: issues@openoffice.apache.org Reporter: j.tro...@hotmail.fr CC: issues@openoffice.apache.org Hello, This code fails, with/without Preserve (Object variable not set): Sub Main a = Array(1,2,3) Redim a(LBound(a)+1,UBound(a)+2) End Sub OK, there's a simple workaround: Sub Main a = Array(1,2,3) lb = LBound(a)+1 ub = UBound(a)+2 Redim a(lb,ub) End Sub or using another Sub : Sub Redim1(myArray,lb,ub,withPreserve As Boolean) If withPreserve Then Redim Preserve myArray(lb To ub) Else Redim myArray(lb To ub) End If End Sub -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. You are watching all bug changes.