snasui.com ยินดีต้อนรับ ยินดีต้อนรับสู่กระดานถามตอบ Excel and VBA และอื่น ๆ ที่เป็นมิตรกับทุกท่าน มีไฟล์แนบมหาศาล ช่วยให้ท่านค้นหาและติดตามศึกษาได้โดยง่าย สมาชิกท่านใดที่ยังไม่ได้ระบุ Version ของ Excel ที่ใช้งานจริง สามารถทำตาม Link นี้เพื่อจะได้รับคำตอบที่ตรงกับ Version ของท่านครับ ระบุ Version ของ Excel
Private Sub TextBox1_Change()
If Len(TextBox1.Text) = 5 Then
ActiveSheet.Range("$A$1:$c$52").AutoFilter Field:=3, Criteria1:=TextBox1.Text, Operator:=xlAnd
Elself Len(TextBox1.Text) = 4 Then
ActiveSheet.Range("$A$1:$c$52").AutoFilter Field:=3, Criteria1:=TextBox1.Text, Operator:=xlAnd
Else Len(TextBox1.Text) = 3 Then
ActiveSheet.Range("$A$1:$c$52").AutoFilter Field:=3, Criteria1:=TextBox1.Text, Operator:=xlAnd
End If
End Sub
ขอบคุณมากครับ
อาร์ต
You do not have the required permissions to view the files attached to this post.