Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I convert an Excel file to an ASCII file? Pugh Excel Discussion (Misc queries) 1 November 8th 06 08:57 PM
How do I convert an Excel file to an ASCII file? Pugh New Users to Excel 1 November 8th 06 06:57 PM
How do I convert excel file into ASCII text file with alignment? Rosaiah Excel Discussion (Misc queries) 2 June 27th 05 12:17 PM
ascii file import round 2 Mad Scientist Excel Programming 1 January 8th 04 08:47 PM
Import ascii file Mad Scientist Excel Programming 2 January 8th 04 01:38 AM


All times are GMT +1. The time now is 12:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"