Is there a performance benefit of having variables dimensioned in the beginning of a function verses having them declared just before they are used?
I am using VBA in MS Access 2003.
Example,
Function f(y As Long) As Long
Dim x As Long
If y <> 0 Then
x = 1000000
End If
End Function
Verses
Function f(y As Long) As Long
If y <> 0 Then
Dim x As Long
x = 1000000
End If
End Function