![]() |
Ascii file import round 3
Thanks to mudraker for the help...I finally got it to open
my ascii file in the format that I wanted with the following code: Private Sub CommandButton1_Click() Dim sFile As String sFile$ = Application.GetOpenFilename("Text Files (*.*),*.txt") Workbooks.OpenText Filename:=sFile, Origin:=xlWindows _ , StartRow:=1, DataType:=xlDelimited, TextQualifier:= _ xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, _ Comma:=True, Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), _ Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1), Array(8, 1), _ Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1)) However, I would like to now put it in the active sheet in cell p1...where do I place that code...I tried with ActiveSheets.add but I'm lost from there... Thanks a lot in advance Mad Scientist...really going mad... |
Ascii file import round 3
The only way I know of doing this is to open the text file ( as alread
done) then copy column a to column p To copy from Column A to column P same sheet Activesheet.columns("A").Copy Destination:=Activesheet.columns("A") To Copy to a different worksheet Activesheet.columns("A").Copy Destination:=Workbooks("Nam Here").sheets("Sheet Name".columns("P" -- Message posted from http://www.ExcelForum.com |
All times are GMT +1. The time now is 09:22 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com