excel vba代码在列中查找值很慢,我如何使它更快?

我的vba代码如下,如何更快? (obs:我有+ – 33000行的价值)我从产品search代码到我的公司,我需要帮助做得更快。

Private Sub TextBox1_Enter() Dim FindString As String Dim Rng As Range FindString = TextBox1.Text If Trim(FindString) <> "" And Len(TextBox1.Text) = 6 Then With Sheets("CADMAT").Range("B:B") 'searches all of column B Set Rng = .Find(What:=FindString, _ After:=.Cells(.Cells.Count), _ LookIn:=xlValues, _ LookAt:=xlWhole, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) If Not Rng Is Nothing Then Dim ultimalinha As Object Set ultimalinha = Plan3.Range("A35565").End(xlUp) ultimalinha.Offset(1, 0).Value = TextBox1.Text ultimalinha.Offset(1, 1).Value = TextBox2.Text TextBox1.Text = "" TextBox2.Text = "" TextBox1.SetFocus Else MsgBox "Produto não existe na tabela!" 'value not found TextBox1.Text = "" TextBox2.Text = "" TextBox1.SetFocus End If End With End If End Sub 

选项显式

Private Sub TextBox1_Enter()

Application.ScreenUpdating = False

代码在这里…

Application.ScreenUpdating = True

结束小组