VARPTR |
VARPTR(ptr) |
Returns a LongPtr on a 64 bit version and a Long on a 32 bit version. |
ptr | The variant variable. |
REMARKS |
* This returns the address (or pointer) for a particular variable. * To return the address of a string, instead of the variable holding the string, pass the string variable using ByVal. * This function does not appear in the intellisense. * This function was added in Office 2010. * This is similar to the OBJPTR function. * This is similar to the STRPTR function. |
Dim myLong As Long
Debug.Print VarPtr(myLong)
Dim myString As String
Debug.Print VarPtr(myString)
Dim myString As String
Debug.Print VarPtr(ByVal myString)
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top