STRPTR(ptr)

Returns a LongPtr on a 64 bit version and a Long on a 32 bit version.


ptrThe string variable

REMARKS
* This is often used when passing in UNICODE strings.
* This function can tell the difference between an empty string ("") and a null string (vbNullString).
* This function does not appear in the intellisense.
* This function was added in Office 2010.
* This is similar to the OBJPTR
* This is similar to the VARPTR

Dim myString As String 
Debug.Print StrPtr(myString)

Debug.Print StrPtr("") 'non-zero
Debug.Print StrPtr(vbNullString) 'zero

© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited Top