+ Reply to Thread
Results 1 to 7 of 7

Generate ClientID

  1. #1
    Registered User
    Join Date
    03-16-2016
    Location
    Athens, Georgia
    MS-Off Ver
    2013
    Posts
    4

    Generate ClientID

    Hello,

    I have a UserForm and i wanted to know if there is a VBA code i can use to generate a 5 to 8 digit number without repeating. I want to be able to assign my clients a unique number.

  2. #2
    Registered User
    Join Date
    03-16-2016
    Location
    Athens, Georgia
    MS-Off Ver
    2013
    Posts
    4

    Re: Generate ClientID

    Attachment 654298

    this is my UserForm

  3. #3
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: Generate ClientID

    .
    To attach your project to your post, click on GO ADVANCED which is located in the lower right or where you REPLY TO THREAD.

    In the next screen, below your post, select MANAGE ATTACHMENTS.

  4. #4
    Valued Forum Contributor saravnepali's Avatar
    Join Date
    01-14-2019
    Location
    Sydney Australia
    MS-Off Ver
    2010
    Posts
    447

    Re: Generate ClientID

    The followin has a function to generate N random numbers that do not repeat

    And are entered as a cell value

    Please Login or Register  to view this content.
    Last edited by saravnepali; 12-18-2019 at 05:54 AM.
    If you think someone helped you, click on the "* Add Reputation" as a way to say thank you.

    If your problem is solved, go to Thread Tools and select Mark This Thread Solved

  5. #5
    Registered User
    Join Date
    03-16-2016
    Location
    Athens, Georgia
    MS-Off Ver
    2013
    Posts
    4

    Re: Generate ClientID

    this is what im working on ans Sara thank you for the code. It works but i cant find where i made a mistake in the code i use and adding the code you posted above
    Attached Files Attached Files

  6. #6
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,303

    Re: Generate ClientID

    Another approach to consider.
    Based upon similar method that small accounting packages adopt (part customer name id + serial number).
    Presently set as (first initial + surname initial + random number (01 to 99))
    To 'ADD' a new entry, first 'CLEAR' form then press 'NEW' to add your detail to DataTable, the rest should be self explanatory.
    torachan.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    03-16-2016
    Location
    Athens, Georgia
    MS-Off Ver
    2013
    Posts
    4

    Re: Generate ClientID

    Thanks Torachan and saravnepali...you guys really helped me out a lot!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 02-24-2018, 10:56 AM
  2. generate combinations
    By aprildu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-05-2016, 05:31 AM
  3. Replies: 1
    Last Post: 02-16-2016, 07:51 PM
  4. Need to generate 1, 2, 4, 8, 16... and so on...
    By aj34321 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-02-2015, 09:09 PM
  5. generate a flowchart??
    By jumbel in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-18-2008, 11:22 AM
  6. generate a random number and use if function to generate new data
    By Dogdoc1142 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-25-2006, 10:50 PM
  7. generate y value
    By AhmtDY in forum Excel General
    Replies: 1
    Last Post: 10-19-2005, 08:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1