himaruasuka
New Member
- Joined
- May 26, 2022
- Messages
- 12
- Office Version
- 2013
- Platform
- Windows
- Mobile
Good day! I already searched the threads and look for an answer to my question but I can't find the answer. Though I am new to excel vba, i don't know how to explain.
I want to generate a Serial number or an Order Number Code when clicking the command button (Add Order) and display the Number Code in the assigned textbox.
I want to display the code like this "HP-0000" "HP-0001" so on so forth.. But when I click the button, it only display one-digit number only.
I just happen to find this code and try, but its not what I am looking ..
also the another problem was It begins to number "4", I tried to delete the other table row but it display to number "3". I do not know what happen.
Can anyone help me to fix this? Thank you in advance~
I want to generate a Serial number or an Order Number Code when clicking the command button (Add Order) and display the Number Code in the assigned textbox.
I want to display the code like this "HP-0000" "HP-0001" so on so forth.. But when I click the button, it only display one-digit number only.
I just happen to find this code and try, but its not what I am looking ..
VBA Code:
Private Sub UserForm_Initialize()
pos_orderno.Value = Sheet4.Range("F5").CurrentRegion.Rows.Count
End Sub
also the another problem was It begins to number "4", I tried to delete the other table row but it display to number "3". I do not know what happen.
Can anyone help me to fix this? Thank you in advance~