Skip to content

Instantly share code, notes, and snippets.

@derrickturk
Created March 5, 2014 21:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save derrickturk/9377154 to your computer and use it in GitHub Desktop.
Save derrickturk/9377154 to your computer and use it in GitHub Desktop.
Option Explicit
Public Function arrayAddress(ByRef arr() As Double) As Long
arrayAddress = VarPtr(arr(0))
End Function
Public Sub investigateArrays()
Dim d(0 To 9) As Double
Dim x() As Double
ReDim x(0 To 99)
Debug.Print arrayAddress(d) Mod 16
Debug.Print arrayAddress(x) Mod 16
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment