This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private sArray | |
Dim Dic As Object | |
Private Sub UserForm_Initialize() | |
Set Dic = CreateObject("Scripting.Dictionary") | |
sArray = S2.Range("A1:D" & S2.[A65536].End(xlUp).Row).Value | |
LBDMHH.List() = sArray |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub TXTFIND_Change() | |
Call WaitFor(0.05) | |
Dim Arr, i | |
If CBDMHH.Value = "ALL" Then | |
Arr = FilterMCLArray(sArray, 4, TXTFIND.Text, True) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub LBDMHH_Change() | |
Dim Id, i | |
Id = LBDMHH.ListIndex | |
With Me.LBDMHH | |
On Error Resume Next | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub CMDADD_Click() | |
On Error Resume Next | |
Dim Arr(), i | |
Arr = Dic.Items | |
If ActiveCell.Column = 1 Then | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub UserForm_Terminate() | |
Set Dic = Nothing | |
Erase sArray | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) | |
Cancel = True | |
With Target | |
If .Row > 1 And .Count = 1 And .Column = 1 And .Value = "" Then | |
FrmDMHH.Show | |
End If | |
End With | |
Cancel = False | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'https://www.hocexcel.online/tong-hop-du-lieu-tu-nhieu-file-excel-vao-1-file-khong-can-mo-file.html | |
Sub merge_all() | |
Dim cnn As ADODB.Connection | |
Dim rst As ADODB.Recordset | |
Dim sh As Worksheet | |
Dim I As Long, k As Long, CountFiles As Long, J As Long | |
'# Sửa Sheet1 và A1:U1000 cho phù hợp với dữ liệu của bạn | |
SheetName = "Sheet1" & "$" | |
RangeAddress = "A1:U1000" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Private Sub cbSetText_Click() | |
MsgBox myTextbox.Value | |
End Sub | |
Private Sub myTextbox_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) | |
Select Case KeyAscii | |
Case Is < vbKey0, Is > vbKey9 | |
KeyAscii = 0 | |
Beep | |
End Select | |
End Sub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub MergeSheets() | |
Dim x As Integer | |
Dim ws As Worksheet | |
On Error GoTo ErrHandler | |
Application.ScreenUpdating = False | |
x = 1 | |
For Each ws In ThisWorkbook.Sheets | |
If ws.Name <> "Tong Hop" Then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Reversestr(str As String) As String | |
Reversestr = StrReverse(Trim(str)) | |
End Function |