Hi I have a code and I didn't make any change, but I am getting Type mismatch error. It was working properly previously.
Code :
Private Sub UserForm_Initialize()
Dim r As Integer
Dim c As Integer
Me.ComboBox1.RowSource = "Intro!A3:A" & Range("A" & Rows.Count).End(xlUp).Row
r = Application.Match("c", Columns(1), 0)
c = Application.Match("cc", Rows(1), 0)
TextBox1.Value = Cells(r, c).Value
TextBox2.Value = Cells(r, c + 1).Value
TextBox3.Value = Cells(r, c + 2).Value
TextBox4.Value = Cells(r, c + 3).Value
End Sub
Ran using f8 through code found error when reaching here :
c = Application.Match("cc", Rows(1), 0)
Objective of this line to find match in first row
Dim c As IntegertoDim c As VariantStringif you want to. Currently you assign it asIntegerbut you're look forStringtype