Coloque isso no módulo UserForm1
Option Explicit
Private ur As Range
Private Sub CommandButton1_Click()
Dim c As Range, co As Range
Set c = getLastID
Set co = c.Offset(, -1)
If Len(co) > 0 Then c = co + 1 Else c = ur.Cells(c.Row, 2) * 1000
Me.TextBox1.Text = c
End Sub
Private Sub ComboBox1_Change()
Me.TextBox1.Text = getLastID.Offset(, -1)
End Sub
Private Function getLastID() As Range
Dim sel As String, lc As Long, cr As Long
sel = Me.ComboBox1.Text
If Len(sel) = 0 Then sel = ur.Cells(ur.Row + ur.Rows.Count, 1)
cr = Application.WorksheetFunction.Match(sel, ur.Columns(1), 0)
lc = ur.Cells(cr, ur.Column + ur.Columns.Count + 1).End(xlToLeft).Column
If lc < 5 Then lc = lc + 2
Set getLastID = ur.Cells(cr, lc + 1)
End Function
Private Sub UserForm_Initialize()
Set ur = Worksheets(1).UsedRange
End Sub
para gerar um número de série a partir do ID na coluna B * 1.000 ou incrementar o último ID