Not that I've ever used VBA on a Mac, but I'm assuming some similarity in terms of how the MsgBox function works...

MsgBox returns an Integer, so you'll need:
Dim result As Integer

This returned integer is going to be a known value, so they are assigned as constants within VB - you can use the vbconstant or the integer value, depending on what mood you're in:
vbOK 1
vbCancel 2
vbAbort 3
vbRetry 4
vbIgnore 5
vbYes 6
vbNo 7

Likewise, the messagebox style parameter is a numeric expression. You can use the vbconstants (or their actual values) so for your code to work as is, just declare "result" as an integer as well