Skip to content

Instantly share code, notes, and snippets.

@TGDUY
Created September 7, 2019 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TGDUY/ee0617d71953efca94c7f64c6c835a81 to your computer and use it in GitHub Desktop.
Save TGDUY/ee0617d71953efca94c7f64c6c835a81 to your computer and use it in GitHub Desktop.
Option Explicit
Dim Cls As cSingleFind
Private Sub Worksheet_Activate()
Set Cls = New cSingleFind
With Sheet3
Cls.Main Sheet3, _ Code Name của trang tính cần hiện Textbox
"$B$2", _ Vị trí ô cần hiện Textbox
.TextBox1, _ Textbox tìm kiếm
.ListBox1, _ Listbox
Sheet2.Range("A2:C14").Value, _ Nguồn dữ liệu để ở dạng mảng
[{1,2,3}], _ Những cột trong mảng bạn muốn ghi xuống sheet (Phải đặt trong [{}] )
Array(.[B2], .[B3], .[B4]) Vị trị các ô cần ghi kết quả ra phải ghi kiểu Array()
End With
End Sub
Private Sub Worksheet_Deactivate()
Set Cls = Nothing
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment