Ask Your Question

LO Basic Macro equivalent to MS Excel VBA line: "If Err.Number = 6 Then OutOfBounds = True" [closed]

asked 2013-09-21 12:45:05 +0100

Dycius gravatar image

Hi all,

I am trying to translate a MS Excel VBA Macro into one for LO Calc, and there is a line at the beginning of the Sub that reads:

On Error GoTo OverflowTest

Then at the end of the Sub, there is:

Exit Sub

    If Err.Number = 6 Then OutOfBounds = True
End Sub

Naturally, LO doesn't like this, so what would be the equivalent?

Thanks in Advance

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-11-09 09:34:09.626873

1 Answer

Sort by » oldest newest most voted

answered 2013-09-21 16:37:25 +0100

w_whalley gravatar image

Looks like the error code number is the same but the syntax is slightly different. Try

    If err = 6 then OutOfBounds = true
end sub
edit flag offensive delete link more


Ah.Thank you. :) I hope the error code is the same. There seems to be a lot the same between Excel and Calc, which is nice.

Thanks again.

Dycius gravatar imageDycius ( 2013-09-22 18:47:21 +0100 )edit

Question Tools

1 follower


Asked: 2013-09-21 12:45:05 +0100

Seen: 569 times

Last updated: Sep 21 '13