+ Reply to Thread
Results 1 to 9 of 9

Auto Generate Serial Number using Max Function in userform Text Box

  1. #1
    Registered User
    Join Date
    03-31-2017
    Location
    PAKISTAN
    MS-Off Ver
    2013
    Posts
    3

    Auto Generate Serial Number using Max Function in userform Text Box

    Hi All,

    I have a userform in which i have a button "cmdNew", Whenever i clicked, i want to generate a new serial number in my textbox "DC".

    Would anyone please help me.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Auto Generate Serial Number using Max Function in userform Text Box

    Could you supply additional details?

  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: Auto Generate Serial Number using Max Function in userform Text Box

    If the textbox is located on a form :

    Paste this code in the Form module:

    Please Login or Register  to view this content.
    It is 'fired' with a CommandButton1 click.

    Because it is based on date and time - including seconds - the serial number will always be different.
    Attached Files Attached Files

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Auto Generate Serial Number using Max Function in userform Text Box

    Quote Originally Posted by Logit View Post
    If the textbox is located on a form :

    It is 'fired' with a CommandButton1 click.

    Because it is based on date and time - including seconds - the serial number will always be different.
    Original...and nice
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    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: Auto Generate Serial Number using Max Function in userform Text Box

    Thanks Richard.

  6. #6
    Registered User
    Join Date
    03-31-2017
    Location
    PAKISTAN
    MS-Off Ver
    2013
    Posts
    3

    Re: Auto Generate Serial Number using Max Function in userform Text Box

    Davesexcel,
    I am a new user, please tell me how can i attached my file for your reference?

  7. #7
    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: Auto Generate Serial Number using Max Function in userform Text Box

    Lower right in the QUICK REPLY window ... GO ADVANCED

    Then, MANAGE ATTACHMENTS

  8. #8
    Registered User
    Join Date
    03-31-2017
    Location
    PAKISTAN
    MS-Off Ver
    2013
    Posts
    3

    Re: Auto Generate Serial Number using Max Function in userform Text Box

    I am in advanced section. here attachment button is not working.

  9. #9
    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: Auto Generate Serial Number using Max Function in userform Text Box

    That happens sometimes.

    Can you post the file to a download site like Amazon Cloud, Dropbox, Google, etc ?

+ 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] Auto generate ID number on Textbox userform
    By eddieboyph in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-29-2016, 11:29 PM
  2. [SOLVED] Auto generate a work order number in my userform
    By Losman in forum Excel General
    Replies: 15
    Last Post: 01-14-2016, 01:05 PM
  3. Matching Name and Project Name and generate auto serial number
    By asimmohal in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-28-2015, 05:07 AM
  4. Auto generate serial number
    By silambarasan.J in forum Excel General
    Replies: 2
    Last Post: 01-31-2015, 12:46 PM
  5. Auto generate serial number
    By silambarasan.J in forum Excel General
    Replies: 3
    Last Post: 01-31-2015, 08:33 AM
  6. Excel Drop Down list with Search Suggestions against Auto Generate Serial Number
    By silambarasan.J in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 01-22-2015, 04:27 AM
  7. how to generate serial number on a textbox in userform
    By minionrush in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-16-2013, 05:12 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