+ Reply to Thread
Results 1 to 2 of 2

Format of consecutive number in userform

  1. #1
    Registered User
    Join Date
    10-14-2021
    Location
    Canada
    MS-Off Ver
    365
    Posts
    10

    Format of consecutive number in userform

    Hello,

    This problem is probably very easy to solve but I haven't been able to find the solution.
    I have a user form that has a unique, consecutive ID number which is assigned automatically when the form is loaded. The point of reference to assign that number is the row ID (row -1).
    The form ID begins with the last two digits of the current year and then adds the consecutive number (i.e. 21-001, 21-002, etc).
    However, when the row ID gets to 11 I want it to assign the 21-010, not the 21-0010 it is showing right now.
    Can anyone tell me how to do it?

    This is what I have now:
    Please Login or Register  to view this content.
    Thanks a lot!
    Last edited by 6StringJazzer; 10-20-2021 at 05:08 PM. Reason: please use CODE tags

  2. #2
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    365
    Posts
    19,679

    Re: Format of consecutive number in userform

    Do this:

    Please Login or Register  to view this content.
    That also automatically uses the current year.

    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #2 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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. [SOLVED] Formula finds the max number of consecutive times and the Total of consecutive values
    By rayhen in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-01-2021, 03:06 AM
  2. VBA Date Format displaying as general number within userform
    By excelconditional in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-13-2017, 10:21 PM
  3. Getting a specific Number Format in a TextBox of a UserForm
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-24-2017, 09:16 AM
  4. [SOLVED] Userform Automatic Consecutive number?
    By micope21 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2016, 12:36 PM
  5. Number Format when writing data from VB to excel on a Userform
    By Nathan44 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-12-2013, 05:32 AM
  6. Userform Number Format with Control Source
    By okelly in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-11-2012, 07:42 PM
  7. adding consecutive number to userform textbox
    By jsmity in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-10-2008, 09:04 AM

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