Haiiii,
i have created an userform for my basic requirement ... and i am able to create a code for auto generated Serial Number for the same (eg. 001...) but i want to change the serial numbers in other form eg. "C-001" as i have crated 3 userforms and want unique serial number for respective user form. initially the same working fine but when i have made an amendments in my code for unique serial number , it is not working properly as everytimes i'm getting the same serial number.
Code:
Dim answer As Integer
Dim counting As String
answer = MsgBox("Are you sure you want to save?", vbYesNo + vbQuestion, "Save Sheet")
If answer = vbYes Then
Dim lastrow As Long
Range("A2").Select
lastrow = Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row
counting = "C" & Format(Val(Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp)) + 1, "00000")
textSrNumber = counting
Sheets("Sheet1").Cells(lastrow + 1, 1).Value = textSrNumber.Text
Please help / suggest.
Regards,
Bookmarks