RANDOM ID BASED ON YOUR NAME
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
2 posts
Page 1 of 1
hi everyone here's some code that can help you also whenever you create a system or something like that! hehe
first add two textbox

first add two textbox
- the first one is the TxtID
- and the second one is the txtname
Code: Select all
THANKS TO YOU Try
If txtname.Text.Length >= 3 Then
Dim num As String
num = Format(CInt(Rnd() * 1000), "000")
Dim letters As String = ""
letters = txtTitle.Text.Substring(0, 3)
Dim month As String
month = Format(Today, "MMM").ToUpper
Dim year As Integer
year = Today.Year
txtID.Text = num & letters & "-" & month & year
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub

i didn't copied this
i learned it through the tutorial of our school so i have decided to share it.
i learned it through the tutorial of our school so i have decided to share it.
2 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023