Aşağıdaki kodlarda 18-62 arası satırdan oluşan 2 tablom var. 1.tablomun 62.satırına gelince, yandaki tablomun 18.satırdan devam etmesini istiyorum.
Private Sub CommandButton3_Click()
For s = 1 To 10
If Controls("İKY" & s) <> "" Then
For m = 18 To 62
If Cells(m, 1) = "" Then
Cells(m, 1) = Format(TextBox10, "dd.mm.yyyy")
Cells(m, 2) = Format(TextBox14, "dd.mm.yyyy")
Cells(m, 3) = Format(Controls("İKG" & s), "#,##0")
Cells(m, 4) = Format(Controls("İKY" & s), "###0")
GoTo 1:
End If
If Cells(m, 7) = "" Then
Cells(m, 7) = Format(TextBox10, "dd.mm.yyyy")
Cells(m, 8) = Format(TextBox14, "dd.mm.yyyy")
Cells(m, 9) = Format(Controls("İKG" & s), "#,##0")
Cells(m, 10) = Format(Controls("İKY" & s), "###0")
GoTo 1:
End If
2:
Next
End If
1:
Next
end sub
Private Sub CommandButton3_Click()
For s = 1 To 10
If Controls("İKY" & s) <> "" Then
For m = 18 To 62
If Cells(m, 1) = "" Then
Cells(m, 1) = Format(TextBox10, "dd.mm.yyyy")
Cells(m, 2) = Format(TextBox14, "dd.mm.yyyy")
Cells(m, 3) = Format(Controls("İKG" & s), "#,##0")
Cells(m, 4) = Format(Controls("İKY" & s), "###0")
GoTo 1:
End If
If Cells(m, 7) = "" Then
Cells(m, 7) = Format(TextBox10, "dd.mm.yyyy")
Cells(m, 8) = Format(TextBox14, "dd.mm.yyyy")
Cells(m, 9) = Format(Controls("İKG" & s), "#,##0")
Cells(m, 10) = Format(Controls("İKY" & s), "###0")
GoTo 1:
End If
2:
Next
End If
1:
Next
end sub