使用者定義函數中的範圍引數被視為 Variant 處理時,則只能夠和超高速相容。例如,對於以下列方式呼叫工作表的函數 =MyFunc(A1:E4, 5, 4):
Function MyFunc (MyData As Variant, Rows As Long, Cols As Long) As Double
For I = 1 to Rows
For J = 1 to Cols
MsgBox MyData(I, J) 'or otherwise work with the cell range as an array
Next J
Next I
End Function