Euro5
asked on
Importing text file not replacing data
Sub Workbook_Open()
filename = "G:\RTMCOMM\Entity.csv"
Set ws = Worksheets("Entity")
Set qt = ws.QueryTables.Add("TEXT;" & filename, ws.Range("A1"))
qt.TextFileConsecutiveDelimiter = False
qt.TextFileTabDelimiter = False
qt.TextFileSemicolonDelimiter = True
qt.TextFileCommaDelimiter = True
qt.TextFileSpaceDelimiter = False
qt.Refresh
End Sub
I am using the above to bring in a text file on open.
However, rather than replacing the existing text, it is moving to the next open column and pasting there.
Should I clear the contents before closing?
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER