https://bz.apache.org/ooo/show_bug.cgi?id=126272
--- Comment #3 from mroe <[email protected]> --- The comment isn't the problem. As I know only oneliners with only one statement is allowed. legal: If <condition> Then <statement> illegal: If <condition> Then <statement> Else <statement> Modify Foo() to Function Foo(A as Integer) As Integer Dim B as Integer If A > 0 Then 'comment B = 2 'comment If A > 2 Then B = 3 Else B = 0 'comment MsgBox( "A" ) 'comment MsgBox( "B" ) 'comment MsgBox( "C" ) 'comment MsgBox( "D" ) End If Foo = B End Function Then you will see that the MsgBoxes will not be reached for A>2. A comment after MsgBox ( "D" ) will also cause the error because the nested If statement is unclosed. IMHO this isn't an issue, it's an illegal oneliner. -- You are receiving this mail because: You are the assignee for the issue.
