Discreum
Yeni Üye
- Katılım
- 21 Mar 2021
- Mesajlar
- 152
- Aldığı beğeni
- 37
- Excel V
- Office 2019 TR
Konu Sahibi
Private Sub CommandButton2_Click()
On Error Resume Next
Dim sh As Worksheet
If ComboBox1.Value(i) Then
Set sh = ThisWorkbook.Sheets(ComboBox1.Value(i))
Dim Last_Row As Long
Last_Row = Application.WorksheetFunction.CountA(sh.Range("I:I"))
sh.Range("I" & Last_Row + 1).Value = "=IF(J" & Last_Row + 1 & "="""","""",ROW()-1)"
sh.Range("J" & Last_Row + 1).Value = Me.TextBox1.Value
sh.Range("K" & Last_Row + 1).Value = Me.TextBox2.Value
sh.Range("L" & Last_Row + 1).Value = Me.TextBox3.Value
sh.Range("M" & Last_Row + 1).Value = Me.TextBox4.Value
sh.Range("N" & Last_Row + 1).Value = Me.TextBox5.Value
sh.Range("O" & Last_Row + 1).Value = Now
End If
Me.TextBox1.Value = ""
Me.TextBox2.Value = ""
Me.TextBox3.Value = ""
Me.TextBox4.Value = ""
Me.TextBox5.Value = ""
Call Refresh_Data
End Sub
kodlama bu şekilde textboxlara veriyi girip ekle diyiromu herhangi bir hatada almıyorum ancak veri girişide olmuyor
On Error Resume Next
Dim sh As Worksheet
If ComboBox1.Value(i) Then
Set sh = ThisWorkbook.Sheets(ComboBox1.Value(i))
Dim Last_Row As Long
Last_Row = Application.WorksheetFunction.CountA(sh.Range("I:I"))
sh.Range("I" & Last_Row + 1).Value = "=IF(J" & Last_Row + 1 & "="""","""",ROW()-1)"
sh.Range("J" & Last_Row + 1).Value = Me.TextBox1.Value
sh.Range("K" & Last_Row + 1).Value = Me.TextBox2.Value
sh.Range("L" & Last_Row + 1).Value = Me.TextBox3.Value
sh.Range("M" & Last_Row + 1).Value = Me.TextBox4.Value
sh.Range("N" & Last_Row + 1).Value = Me.TextBox5.Value
sh.Range("O" & Last_Row + 1).Value = Now
End If
Me.TextBox1.Value = ""
Me.TextBox2.Value = ""
Me.TextBox3.Value = ""
Me.TextBox4.Value = ""
Me.TextBox5.Value = ""
Call Refresh_Data
End Sub
kodlama bu şekilde textboxlara veriyi girip ekle diyiromu herhangi bir hatada almıyorum ancak veri girişide olmuyor