I have the following VBA code:

```
Function InputElmt(element As Double) As Variant
    InputElmt = element
End Function

Sub runInputElmt()
    Dim arr() As Variant, Firstelmt As Double
    arr = Array(1, 2)

    Debug.Print InputElmt(arr(0) * 1)   ' 1st call

    Firstelmt = arr(0)
    Debug.Print InputElmt(Firstelmt)    ' 2nd call

    Debug.Print InputElmt(arr(0))       ' 3rd call: error
End Sub

```

The sub calls the function `InputElmt` three times. The first two produce the correct results, while the last brings about an error (see [compile error](https://i.stack.imgur.com/pkx9u.png)).

My interpretation is that the third call passes a string of `arr(0)` to the function rather than its evaluation. In contrast, in the first two calls `arr(0)` are evaluated.

My questions are

1) is my explanation correct? and

2) is this error related to ByRef or ByVal as the error message might have indicated?