First let me say that I have used this forum over the last few days and am very pleased with all the information I have found.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o></o>
Second let me say that this is my first of many posts.<o></o>
<o></o>
Okay on with it.. I am getting the following error<o></o>
<o></o>
Runtime error 13 type mismatch when I run the macro and select (using the combo box) row 9 that is a number (without any letters). I am trying to be able to use both numbers and text and a combination of both. Have just a number in a row that i select in the macro causes the error.
<o></o>
I have bolded where debug highlights yellow<o></o>
<o></o>
Any help would be of great services <o></o>
<o></o>
I would attach the file but it seems I do not have permissions yet so here is the code below. If you would like me to email it please let me know.<o></o>
Thanks
<o></o>
Public myRow As Long
Private Sub ComboBox1_Click()
myRow = Application.Match(Me.ComboBox1.Value, Sheets("EPR Tracker").Range("A:A"), 0)
Me.TextBox1.Value = Application.Index(Sheets("EPR Tracker").Columns(2), myRow)
End Sub
Private Sub CommandButton1_Click()
' Stores the name for search value
NameOrig = TextBox1.Value
'Finds the name from the dropdown and deletes it
With Worksheets("EPR Tracker").Range("A:A")
.Cells(myRow, 2).Value = TextBox1.Value
' etc.
End With
Unload Me
End Sub
Private Sub UserForm_Initialize()
For Each c In Worksheets("EPR Tracker").Range("A2", Range("A65000").End(xlUp))
Me.ComboBox1.AddItem c.Value
Next c
End Sub
<o></o>
Second let me say that this is my first of many posts.<o></o>
<o></o>
Okay on with it.. I am getting the following error<o></o>
<o></o>
Runtime error 13 type mismatch when I run the macro and select (using the combo box) row 9 that is a number (without any letters). I am trying to be able to use both numbers and text and a combination of both. Have just a number in a row that i select in the macro causes the error.
<o></o>
I have bolded where debug highlights yellow<o></o>
<o></o>
Any help would be of great services <o></o>
<o></o>
I would attach the file but it seems I do not have permissions yet so here is the code below. If you would like me to email it please let me know.<o></o>
Thanks
<o></o>
Public myRow As Long
Private Sub ComboBox1_Click()
myRow = Application.Match(Me.ComboBox1.Value, Sheets("EPR Tracker").Range("A:A"), 0)
Me.TextBox1.Value = Application.Index(Sheets("EPR Tracker").Columns(2), myRow)
End Sub
Private Sub CommandButton1_Click()
' Stores the name for search value
NameOrig = TextBox1.Value
'Finds the name from the dropdown and deletes it
With Worksheets("EPR Tracker").Range("A:A")
.Cells(myRow, 2).Value = TextBox1.Value
' etc.
End With
Unload Me
End Sub
Private Sub UserForm_Initialize()
For Each c In Worksheets("EPR Tracker").Range("A2", Range("A65000").End(xlUp))
Me.ComboBox1.AddItem c.Value
Next c
End Sub
Last edited: