Hey,
I have a rather simple issue I guess. I am trying to transfer data from one excel file to other. I tried using the following code but it shows some funny text that I dont understand. Can someone please help me resolve this fast.
Application.ScreenUpdating = False
Dim sPath As String
Dim fName As String
Dim s As String
s = CurDir
'sPath = "C:\Myfolder\Myfiles"
ChDrive sPath
fName = Application.GetOpenFilename( _
Filefilter:="Excel Files (*.xlsx),*.xlsx")
ChDrive s
ChDir s
If LCase(fName) = "false" Then Exit Sub
With ActiveSheet.QueryTables.Add _
(Connection:="TEXT;" & fName, _
Destination:=Cells(Rows.Count, "A").End(xlUp).Offset(1))
.Name = Replace(LCase(fName), ".xlsx", "")
.TextFileStartRow = 2
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = False
.Refresh False
End With
Edit/Delete Message
Bookmarks