Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Import ascii file
I'm puzzled because I'm trying to figure out a way to
write a macro to import ascii files from instruments into my worksheets. I would like to be able to type the file name into a text box and have it automatically import the data to either a new sheet or existing worksheet. Does anyone have any hints as to how I may bo about doing this? Thanks in advance and science thanks you! Mad Scientist |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Import ascii file
sPath = "C:\My Tools\My Instruments\"
workbooks.Open sPath & Sheet1.Textbox1.Text -- Regards, Tom Ogilvy Mad Scientist wrote in message ... I'm puzzled because I'm trying to figure out a way to write a macro to import ascii files from instruments into my worksheets. I would like to be able to type the file name into a text box and have it automatically import the data to either a new sheet or existing worksheet. Does anyone have any hints as to how I may bo about doing this? Thanks in advance and science thanks you! Mad Scientist |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Import ascii file
Try this
Dim sFile as string sFile$ = Application.GetOpenFilename("Text Files (*.*),*.txt") If sFile = False Then End End If Workbooks.OpenText FileName:=sFile, Origin:=xlWindows _ , StartRow:=1, DataType:=xlFixedWidth, FieldInfo:=Array(0, 1) end sub --- 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) | |||
Convert a file to an ASCII | Excel Worksheet Functions | |||
How do I convert an Excel file to an ASCII file? | New Users to Excel | |||
using data from ascii file? | Excel Discussion (Misc queries) | |||
How do I convert excel file into ASCII text file with alignment? | Excel Discussion (Misc queries) |