Hi all, i just migrated to 64 bit, and received a message stating i need to ptrsafe to all declare statements.

After a bit of research, I did this, and this is the only change made. eg, i changed:

Public Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
to

Public Declare PtrSafe Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Now when i try run the addin i get a message to say there is a problem with the addin and excel just shuts down again unless i disable the addin.

Any ideas ?

I am running win10 64bit and o365 64bit