I wrapped an error handler around your code and added Option Explicit at the top. Those two things will help you troubleshoot in the future.
REM ***** BASIC *****
Option Explicit
Sub Main
On Error Goto ErrHandler
Dim x(3) As Integer
Dim i As Integer
x = testFunction()
For i = 0 To 2
MsgBox "value at row " & i & " is: " & x(i), MB_OK, "Results of Loop"
Next i
ExitSub:
Exit Sub
ErrHandler:
If MsgBox ("Error " & Err & " at line " & Erl & " - " & Error$ & Chr$(13) & "Continue?", MB_ICONSTOP + MB_YESNO , "Error in Sub Main") = IDYES Then
Resume Next
Else
Resume ExitSub
End IF
End Sub
Function testFunction() As Array
On Error Goto ErrHandler
testFunction = array(1,2,3)
ExitSub:
Exit Function
ErrHandler:
If MsgBox ("Error " & Err & " at line " & Erl & " - " & Error$ & Chr$(13) & "Continue?", MB_ICONSTOP + MB_YESNO , "Error in testFunction") = IDYES Then
Resume Next
Else
Resume ExitSub
End IF
End Function