create unique number for naming file using VB

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nickyazura
    New Member
    • Mar 2008
    • 4

    create unique number for naming file using VB

    Hi,
    I would like to ask you regarding creating file name by adding unique number where it can automatically generated

    Dim sFileE As String
    sFileE = ".csv"
    sFileName = "Weld_In_Record " & Format(Now, "yyyymmdd") & sFileE

    after run, i can get a result of Weld_In_Record2 0080304.csv

    here, i want to add more by putting other sequential unique number

    example
    Weld_In_Record2 00803040001.csv
    Weld_In_Record2 00803040002.csv
    Weld_In_Record2 00803040003.csv

    those number are in 4 digit , "0000". after 12midnight, those number will reset to 0000. This file will generate frequently using scheduler.
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    What about using time with date for the name in proper format .

    I think that is the best solution.

    Comment

    • nickyazura
      New Member
      • Mar 2008
      • 4

      #3
      hmm
      i was asked to do sequential no..by the way, those problem already solve but the sequential number only 1 digit..it cannot generate to 0001,0002

      Comment

      Working...