Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Possible to generate a GUID in Excel?
Is there an easy way to create a GUID in Excel? (Is there a Microsoft
library I can call, or do I have to write my own?) Any help is appreciated... thanks, Dan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Possible to generate a GUID in Excel?
Dan,
You can call the CoCreateGuid API function to create a GUID. For example, Declare Function CoCreateGuid Lib "ole32" (ByRef GUID As Byte) As Long Sub AAA() Dim ID(0 To 15) As Byte Dim N As Long Dim GUID As String Dim Res As Long Res = CoCreateGuid(ID(0)) For N = 0 To 15 GUID = GUID & IIf(ID(N) < 16, "0", "") & Hex$(ID(N)) Next N Debug.Print GUID End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Dan" wrote in message ... Is there an easy way to create a GUID in Excel? (Is there a Microsoft library I can call, or do I have to write my own?) Any help is appreciated... thanks, Dan |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Possible to generate a GUID in Excel?
ahhh, yes, I should have known that! Thanks!
dan "Chip Pearson" wrote in message ... Dan, You can call the CoCreateGuid API function to create a GUID. For example, Declare Function CoCreateGuid Lib "ole32" (ByRef GUID As Byte) As Long Sub AAA() Dim ID(0 To 15) As Byte Dim N As Long Dim GUID As String Dim Res As Long Res = CoCreateGuid(ID(0)) For N = 0 To 15 GUID = GUID & IIf(ID(N) < 16, "0", "") & Hex$(ID(N)) Next N Debug.Print GUID End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Dan" wrote in message ... Is there an easy way to create a GUID in Excel? (Is there a Microsoft library I can call, or do I have to write my own?) Any help is appreciated... thanks, Dan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Generate powerset in Excel? | Excel Discussion (Misc queries) | |||
To generate Numbers in Excel | Excel Worksheet Functions | |||
Create A GUID | Excel Worksheet Functions | |||
Using Excel to generate schedules | Excel Discussion (Misc queries) | |||
generate a random number and use if function to generate new data | Excel Worksheet Functions |