Weasley0307
New Member
- Joined
- Dec 25, 2023
- Messages
- 6
- Office Version
- 2021
- Platform
- Windows
Hi I am a beginner that just started learning vba recently. I am working on a user entry form where it will automatically generate the next reference no. in the format of YYMMDD-xxx, where xxx will starts from 001 if it is the first entry of today, so theoretically it will look something like this:
231225-001 (first entry of today)
231225-002 (second entry of today)
231226-001 (first entry of a new day)
etc..
I got the format of the date worked out, but I have absolutely no idea how to generate the sequential number behind it and how to code so that it can detect whether the new entry is the first on that current date or not.
Hope someone can help me with this. Thanks!
231225-001 (first entry of today)
231225-002 (second entry of today)
231226-001 (first entry of a new day)
etc..
I got the format of the date worked out, but I have absolutely no idea how to generate the sequential number behind it and how to code so that it can detect whether the new entry is the first on that current date or not.
Hope someone can help me with this. Thanks!