Mismatch Error VBA Excel

SSF1590

Board Regular
Joined
Oct 20, 2019
Messages
73
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
 
It is working perfectly! Thank you very much for your help!

Would it be possible to get help on something else please? I have been trying and posted the same question in another thread since yesterday but I still don't make it work. I want to create a folder based on ComboBox1 in certain directory. The name of the folder that is created has to be the value in combobox1.
https://www.mrexcel.com/forum/excel...er-specific-directory-name-specific-cell.html
 
Last edited by a moderator:
Upvote 0

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
It is working perfectly! Thank you very much for your help!
Glad we could help & thanks for the feedback

As for your new question, please do not ask the same question multiple times. All clarifications, follow-ups, and bumps should be posted back to the original thread.
 
Upvote 0

Forum statistics

Threads
1,223,895
Messages
6,175,257
Members
452,625
Latest member
saadat28

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top