Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    unique idex in sheet during txt file import (2000)

    this a part of my code i want crate in column O a unique index based COUNT & "-" & serial time...

    ELENCO.Range("L" & CONT) = RGZ
    ELENCO.Range("M" & CONT) = MATRIC
    ELENCO.Range("N" & CONT) = CONTR

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: unique idex in sheet during txt file import (2000)

    Could you elaborate on what you want? I have not idea from your question...

    Steve

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: unique idex in sheet during txt file import (2000)

    Found this code, in effect i want a unique ID similar XXXXXX-XXXXXX-XXXXXX where X is randomized number and letter and insert the result in ELENCO.Range("N" & CONT) = UNIQUE_ID:

    Public Function CreateGUID() As String

    Dim ID(0 To 15) As Byte
    Dim CNT As Long, GUID As String

    If CoCreateGuid(ID(0)) = 0 Then
    For CNT = 0 To 15
    CreateGUID = CreateGUID + IIf(ID(CNT) < 16, "0", "") + Hex$(ID(CNT))
    Next CNT
    CreateGUID = Left$(CreateGUID, 8) + "-" + Mid$(CreateGUID, 9, 4) + "-" + Mid$(CreateGUID, 13, 4) + "-" + Mid$(CreateGUID, 17, 4) + "-" + Right$(CreateGUID, 12)
    End If

    End Function

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •