Multiple Apps
Create a GUID (Globally Unique Identifier)
Ease of Use
Easy
Version tested with
2003
Submitted by:
Oorang
Description:
Returns a GUID in a string.
Discussion:
There are many reasons why you would want an ID or name that is reasonably certain to be unique. Tagging your custom controls, as a primary key, for temp files etc. This shows a very simple way to create one.
Code:
instructions for use
Public Sub TestGetGUID() MsgBox GetGUID, vbInformation, "GUID Generated" End Sub Public Function GetGUID() As String GetGUID = Mid$(CreateObject("Scriptlet.TypeLib").GUID, 2, 36) End Function
How to use:
Test the code:
Sample File:
GUID_List.zip 22.88KB
Approved by mdmackillop
This entry has been viewed 411 times.
Please read our Legal Information and Privacy Policy Copyright @2004 - 2020 VBA Express