UserForm_Initialize kodunuda buna göre ayarlayabilirsiniz sütun artırtıkça.
Deneyin olmazsa bakarız müsait olunca.
Private Sub CommandButton1_Click() 'Saving Button
Dim bulAy As Range, bulKalem As Range
Dim sonData As Long, sonDataKolonNo As Integer
If TextBox2.Value = "" Then
MsgBox "Gider Fatura Tar.", vbExclamation
TextBox2.SetFocus
Exit Sub
End If
With Sheets("Data")
Set bulAy = .Range("A:A").Find(Me.ComboBox2.Value, , xlValues, 1)
Set bulKalem = .Rows(1).Find(Me.ComboBox3.Value, , xlValues, 1)
sonData = .Cells(Rows.Count, 1).End(3).Row
sonDataKolonNo = .Cells(1, Columns.Count).End(xlToLeft).Column
If sonData < 2 Then GoTo son:
If sonDataKolonNo < 2 Then GoTo son:
If Not bulAy Is Nothing And Not bulKalem Is Nothing Then
Call Main 'Progress Bar
.Cells(bulAy.Row, bulKalem.Column) = Me.TextBox4.Value
MsgBox "Registration is successful", vbApplicationModal, ""
ListBox1.List = .Range(.Cells(2, "A"), .Cells(sonData, sonDataKolonNo)).Value
TextBox14.Value = ListBox1.ListCount
Else
GoTo son
End If
End With
son:
Set bulAy = Nothing
Set bulKalem = Nothing
End Sub