STRPTR(ptr) |
Returns a LongPtr on a 64 bit version and a Long on a 32 bit version. |
ptr | The 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 function. * This is similar to the VARPTR function. |
Dim myString As String
Debug.Print StrPtr(myString)
Debug.Print StrPtr("") 'non-zero
Debug.Print StrPtr(vbNullString) 'zero
© 2021 Better Solutions Limited. All Rights Reserved. © 2021 Better Solutions Limited Top