Reputation: 1
I would like to use Try...Catch blocks in some Visual Basic macros for Excel 2011 on a Mac instead of On Error. However, it does not seem to recognize those terms. Is this method of handling exceptions not available on Macs?
Upvotes: 0
Views: 10290
Reputation: 2475
It's not a Mac thing, there is no Try/Catch in VBA. The closest you will get is:
Sub Test()
On Error Goto Err
' This is your 'Try'
Exit Sub
Err:
' This is your 'Catch'
End Sub
Upvotes: 10