This code works on all my existing UserForms
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
But now, with any new work, (on an existing worksheet or a new "test" worksheet) the UserForm will not display the called value in TextBox1
<o></o>
Any idea what’s wrong?
<o></o>
<o></o>
<o></o>
<o>
Very puzzled!
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
But now, with any new work, (on an existing worksheet or a new "test" worksheet) the UserForm will not display the called value in TextBox1
<o></o>
Any idea what’s wrong?
<o></o>
Code:
Private Sub UserForm_Initialize()<o:p></o:p>
Dim x&<o:p></o:p>
With Sheets("Sheet1")<o:p></o:p>
For x = 2 To .Cells(Rows.Count, "A").End(xlUp).Row<o:p></o:p>
ComboBox1.AddItem (.Range("A" & x).Value)<o:p></o:p>
Next x<o:p></o:p>
End With<o:p></o:p>
End Sub
<o></o>
<o>
Code:
</o:p>
Private Sub ComboBox1_Change()<o:p></o:p>
Dim x&<o:p></o:p>
With Sheets("Sheet1")<o:p></o:p>
For x = 1 To .Cells(Rows.Count, "A").End(xlUp).Row<o:p></o:p>
If .Cells(x, "A").Value = Me.ComboBox1.Value Then _<o:p></o:p>
Me.TextBox1.Value = .Cells(x, "B").Value<o:p></o:p>
<o:p></o:p>
Next x<o:p></o:p>
End With<o:p></o:p>
<o:p></o:p>
End Sub
Very puzzled!