CreateGUID

Generate random GUID of 36 chars (with or without brackets) using TypeLib
WithBrackets can be 0 or 1 to have brackets included or removed

CodeFunctionName
What is this?

Public

Tested

Imported
Function CreateGUID(WithBrackets)
' WithBrackets = 1 to include brackets, 0 to remove them
Dim TypeLib : Set TypeLib = CreateObject("Scriptlet.TypeLib")
CreateGUID = TypeLib.Guid
If WithBrackets = 0 Then CreateGUID = Mid(TypeLib.Guid, 2, 36)
Set TypeLib = Nothing
End Function

WithBrackets

0879FFA2-5E64-47E7-A308-147463037561
D2FC8D03-DCC6-4018-ABA8-F082C920438B
5CADCDD9-1B33-4519-AF23-E7C3C68CEA0E
{25390A4A-F462-4516-802D-7A980FA3B637}

Views 3,886

Downloads 1,296

CodeID
DB ID