Hello,
I have the below code that have the purpose to update information in an already exiting database based on the TARA # in ComboBox1. This TARA # is the first column (A) in my workbook "TARADatabase). When I run the code, it gives me error 13 mismatch in the line i made bold in the code. the TARA # is compose of numbers and letters. This is the format, TARA-19-001. Can someone please help me? I do not know what I should change in the code to run properly.
Thank you.
Private Sub CommandButton1_Click()
If Me.ComboBox1.Value = "" Then
MsgBox "TARA Can Not be Blank!", vbExclamation, "TARA"
Exit Sub
End If
TARA = Me.ComboBox1.Value
Sheets("TARADatabase").Select
Dim rowselect As String
rowselect = Me.ComboBox1.Value
rowselect = rowselect + l
Rows(rowselect).Select
Cells(rowselect, 4) = Me.TextBox4.Value
Cells(rowselect, 5) = Me.TextBox5.Value
Cells(rowselect, 6) = Me.TextBox6.Value
Cells(rowselect, 7) = Me.TextBox8.Value
Cells(rowselect, 8) = Me.TextBox9.Value
Cells(rowselect, 9) = Me.TextBox10.Value
Cells(rowselect, 10) = Me.TextBox11.Value
Cells(rowselect, 11) = Me.TextBox12.Value
Cells(rowselect, 12) = Me.TextBox13.Value
Cells(rowselect, 12) = Me.TextBox14.Value
Cells(rowselect, 14) = Me.TextBox15.Value
Cells(rowselect, 15) = Me.TextBox16.Value
Cells(rowselect, 16) = Me.TextBox17.Value
Cells(rowselect, 17) = Me.TextBox18.Value
Cells(rowselect, 18) = Me.TextBox19.Value
Cells(rowselect, 19) = Me.TextBox23.Value
End Sub
I have the below code that have the purpose to update information in an already exiting database based on the TARA # in ComboBox1. This TARA # is the first column (A) in my workbook "TARADatabase). When I run the code, it gives me error 13 mismatch in the line i made bold in the code. the TARA # is compose of numbers and letters. This is the format, TARA-19-001. Can someone please help me? I do not know what I should change in the code to run properly.
Thank you.
Private Sub CommandButton1_Click()
If Me.ComboBox1.Value = "" Then
MsgBox "TARA Can Not be Blank!", vbExclamation, "TARA"
Exit Sub
End If
TARA = Me.ComboBox1.Value
Sheets("TARADatabase").Select
Dim rowselect As String
rowselect = Me.ComboBox1.Value
rowselect = rowselect + l
Rows(rowselect).Select
Cells(rowselect, 4) = Me.TextBox4.Value
Cells(rowselect, 5) = Me.TextBox5.Value
Cells(rowselect, 6) = Me.TextBox6.Value
Cells(rowselect, 7) = Me.TextBox8.Value
Cells(rowselect, 8) = Me.TextBox9.Value
Cells(rowselect, 9) = Me.TextBox10.Value
Cells(rowselect, 10) = Me.TextBox11.Value
Cells(rowselect, 11) = Me.TextBox12.Value
Cells(rowselect, 12) = Me.TextBox13.Value
Cells(rowselect, 12) = Me.TextBox14.Value
Cells(rowselect, 14) = Me.TextBox15.Value
Cells(rowselect, 15) = Me.TextBox16.Value
Cells(rowselect, 16) = Me.TextBox17.Value
Cells(rowselect, 17) = Me.TextBox18.Value
Cells(rowselect, 18) = Me.TextBox19.Value
Cells(rowselect, 19) = Me.TextBox23.Value
End Sub