Public Sub Import() Dim ws As Worksheet, strFile As String Set ws = ActiveWorkbook.ActiveSheet strFile = Application.GetOpenFilename("Text Files (*.csv),*.csv", , "Please select text file...") With ws.QueryTables.Add(Connection:="TEXT;" & strFile, Destination:=ws.Range("A1")) .TextFileParseType = xlDelimited .TextFileCommaDelimiter = True .Refresh End With End Sub
Welcome to FreeSoftwareServers Confluence Wiki
Overview
Content Tools