Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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... |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I convert an Excel file to an ASCII file? | Excel Discussion (Misc queries) | |||
How do I convert an Excel file to an ASCII file? | New Users to Excel | |||
How do I convert excel file into ASCII text file with alignment? | Excel Discussion (Misc queries) | |||
ascii file import round 2 | Excel Programming | |||
Import ascii file | Excel Programming |