Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Private Sub TextBox1_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If Len(TextBox1.Text) > 0 Then
ListBox1.Visible = True
ListBox1.Clear
For i = 1 To Sheets("词条").Cells(Rows.Count, 1).End(xlUp).Row
If Sheets("词条").Cells(i, 1) Like TextBox1.Text & "*" Then
ListBox1.AddItem Sheets("词条").Cells(i, 1)
End If
Next i
Else
ListBox1.Clear
End If
DoEvents
ListBox1.Height = 9 * ListBox1.ListCount + 10
Me.Height = 9 * ListBox1.ListCount + 75
End Sub