• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

autonumber userform

dpw_1

New Member
I have created a userform that adds record to a spreadsheet and I am looking for a simple way to autonumber the records. That is, the first record will be assigned a starting number (say 1000) and then each new record would be automatically assigned the next number (1001, 1002 etc.). If possible, I would also like the record number to appear on the user form so that the user knows what record they are entering.
 
How about doing something like:

[pre]
Code:
Dim LastRecord as Integer
LastRecord = WorksheetFunction.Max(Worksheets("My Data").Range("A:A"))
[/pre]
From there, it should be simple enough to display it on the user form and/or figure out the next record.
 
Back
Top