Hello I just watched youtube tutorial about set up a button to import .csv file. However, it wcan not show normally while I adding .csv file using 65001: Unicode (UFT-8). Therefore, may I ask is ther any code that can solve this problem?
https://www.youtube.com/watch?v=EzUTK5hhjWM&t=997s&ab_channel=TeachExcel
Dim fileToOpen As Variant
Dim fileFilterPattern As String
Dim wsMaster As Worksheet
Dim wbTextImport As Workbook
Application.ScreenUpdating = False
fileToOpen = Application.GetOpenFilename(fileFilterPattern)
If fileToOpen = False Then
MsgBox "No file selected."
Else
Workbooks.OpenText _
Filename:=fileToOpen, _
StartRow:=2, _
DataType:=xlDelimited, _
Tab:=True
Set wbTextImport = ActiveWorkbook
Set wsMaster = ThisWorkbook.Worksheets("Data")
wbTextImport.Worksheets(1).Range("A1").CurrentRegion.Copy wsMaster.Range("A3")
wbTextImport.Close False
End If
Application.ScreenUpdating = True
End Sub