+ Reply to Thread
Results 1 to 7 of 7

Excel - VBA Form - populate worksheet table with auto increment ID, worksheet headers only

  1. #1
    Registered User
    Join Date
    11-13-2015
    Location
    Ireland
    MS-Off Ver
    2013
    Posts
    6

    Question Excel - VBA Form - populate worksheet table with auto increment ID, worksheet headers only

    Hello All,

    Please be kind, I have only started using VBA code in Excel in the last week . I have some experience with Access, but it is very different.

    I need to produce an excel template that will have a dashboard worksheet containing buttons linking to various VBA data entry forms which in turn populate tables in other worksheets. I need this to be issued as a blank template once finalised, so no data can exist in the tables but the forms still need to work.

    Screenshot 2015-11-13 12.56.04.png

    The problem I have encountered in the attached example is when trying to enter a new asset, I cannot get the AssetID field to populate automatically. I have tried numerous codes found from all across the web, but nothing has worked so I am not evening going to show what I have tried. There is other code present, but that is for other functions such as adding the manually entered text to the tables, closing the form etc. I believe I have the code correct to insert the Asset ID into the table when it is created, I just have problems generating the incremental Asset ID.

    PS - please excuse my messy code, at this point I am totally focusing on getting it to work rather than cleanliness...
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Excel - VBA Form - populate worksheet table with auto increment ID, worksheet headers

    this give a unique number


    Kind regards
    Leo
    Attached Files Attached Files

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Excel - VBA Form - populate worksheet table with auto increment ID, worksheet headers

    Hello EKExcel,

    Welcome to the Forum!

    Here is the complete code for USerForm1. I have shortened the code a bit.

    The AssetID number is on the "Dashboard" worksheet behind the "Stakeholders" button in cell C10.

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Registered User
    Join Date
    11-13-2015
    Location
    Ireland
    MS-Off Ver
    2013
    Posts
    6

    Re: Excel - VBA Form - populate worksheet table with auto increment ID, worksheet headers

    Thank you very much Leo!! This is perfect

    [SOLVED]
    Last edited by EKExcel; 11-16-2015 at 04:15 AM. Reason: [SOLVED]

  5. #5
    Registered User
    Join Date
    11-13-2015
    Location
    Ireland
    MS-Off Ver
    2013
    Posts
    6

    Re: Excel - VBA Form - populate worksheet table with auto increment ID, worksheet headers

    Thanks to you also Leigh, very much appreciated

    [SOLVED]

  6. #6
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Excel - VBA Form - populate worksheet table with auto increment ID, worksheet headers

    Please mark your thread as Solved by selecting Thread Tools (just above your first post) --> Mark thread as solved.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  7. #7
    Registered User
    Join Date
    11-13-2015
    Location
    Ireland
    MS-Off Ver
    2013
    Posts
    6

    Re: Excel - VBA Form - populate worksheet table with auto increment ID, worksheet headers

    Thanks sktneer, it's my first post on the forum and still finding where everything is...

+ 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. Dynamic drop down + fields and auto populate from one worksheet to another worksheet
    By Shermaine2010 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-26-2014, 04:57 AM
  2. Replies: 0
    Last Post: 04-19-2013, 10:44 AM
  3. Replies: 3
    Last Post: 11-29-2012, 08:01 PM
  4. Replies: 2
    Last Post: 04-13-2012, 01:16 PM
  5. Replies: 2
    Last Post: 08-28-2010, 04:43 PM
  6. auto increment worksheet while copying
    By ocdg678 in forum Excel General
    Replies: 2
    Last Post: 09-13-2008, 12:17 AM
  7. [SOLVED] increment/populate numbers by worksheet
    By br549 in forum Excel General
    Replies: 3
    Last Post: 01-04-2005, 06:06 PM

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