Cơ bản cho cậu
Sub LoadExcelFile()
Dim result
result = Application.GetOpenFilename("Excel files,*.xl?", 1)
If result = False Then Exit Sub
Workbooks.Open result
End Sub
Sub OpenMulti()
Dim FileNames As Variant
Dim Msg As String
Dim I As Integer
FileNames = Application.GetOpenFilename(MultiSelect:=True)
If IsArray(FileNames) Then
Msg = "You selected:" & vbNewLine
For I = LBound(FileNames) To UBound(FileNames)
Msg = Msg & FileNames(I) & vbNewLine
Workbooks.Open FileNames(I)
Next I
MsgBox Msg
Else
MsgBox "No files were selected."
End If
End Sub
Bài mở 1 file và mở 1 lúc nhiều files . Xem cho kỹ và nhận định . Msg là để cậu hiểu từng step đi . Còn *.xl?", là ta hu ke xls, xlsx, xlxm....... To open multi files excel click 1st file, press Ctrl and hold key, continue click other files
Sub GetImport()
Dim Finfo As String
Dim FilterIndex As Integer
Dim Title As String
Dim FileName As Variant
Finfo = "Text Files (*.txt),*.txt," & _
"Lotus Files (*.prn),*.prn," & _
"Comma Separated Files (*.csv),*.csv," & _
"ASCII Files (*.asc),*.asc," & _
"All Files (*.*),*.*"
' Display *.* by default
FilterIndex = 5
Title = "Select a File to Import"
FileName = Application.GetOpenFilename(Finfo, FilterIndex, Title)
If FileName = False Then
MsgBox "No file was selected."
Else
MsgBox "You selected " & FileName
Workbooks.Open FileName
End If
End Sub
Thử mở file txt bang GetImport . Uh oh tự động Import
Đây Vi dụ cho Xmas . Không biết VBA
Merry Xmas 
