Forum

Auto Generate Uniqu...
 
Notifications
Clear all

Auto Generate Unique ID Number

5 Posts
2 Users
0 Reactions
208 Views
(@mariyaulfa92)
Posts: 14
Eminent Member
Topic starter
 

Hi all,

Everytime I am adding new data, I wanted the ID textbox to display a new unique ID for the new record automatically. I wanted it to continue even if I close the file. The code has been created but it's not works 🙁

Note : The textbox of idNum was disabled as user not allowed to key in manually.

I would like to ask for your help on this please. See attached below for your review. Thanks in advance.

 
Posted : 23/09/2018 11:20 am
(@sunnykow)
Posts: 1417
Noble Member
 

Hi Mariya

You can refer attached for an example.

I am finding the maximum value in column A and then add 1 to it.

This will give the next sequence number.

Hope this helps.

Sunny

 
Posted : 25/09/2018 12:18 am
(@mariyaulfa92)
Posts: 14
Eminent Member
Topic starter
 

Hi Sunny,

It is works. Thanks for your help ! 

By the way, I have question, how to adding a format ie A0001, A0002, .. in the existing code ? 

 
Posted : 25/09/2018 4:08 am
(@sunnykow)
Posts: 1417
Noble Member
 

Hi Mariya

I will use a different method for this. I am assuming you want a physical prefix with leading zeroes and not formatting the cell.

Refer attached.

Sunny

 
Posted : 25/09/2018 6:54 pm
(@mariyaulfa92)
Posts: 14
Eminent Member
Topic starter
 

Hi Sunny,

It's works ! Thanks 🙂 🙂

 
Posted : 25/09/2018 11:36 pm
Share: