
Create a Globally Unique Identifier (GUID)
I use this routine in almost every application I develop. It’s handy whether you need a key for a collection or whether you use it in a database: Option ExplicitPrivate Declare Function CoCreateGuid Lib _ “OLE32.DLL” (pGuid As GUID) As LongPrivate Declare Function StringFromGUID2 Lib _ “OLE32.DLL” (pGuid As GUID,