Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
command to import a file into excel
i have made an excel file wherein i hve a command button and when
click that command button, a common dolog box opens and i select a tex file, now i have selected a text file, i want to import it int excel,,how would i do that i have attached the file... please let me know thank Attachment filename: vikrama.xls Download attachment: http://www.excelforum.com/attachment.php?postid=54352 -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
command to import a file into excel
assume the variable fname holds the fully qualified path as returned by your
common dialog. Workbooks.Open Filename:=fname If you want special treatment of the text file, look at Workbooks.OpenText Filename:=fname, . . . additional arguments - see help . .. . -- Regards, Tom Ogilvy "vikram " wrote in message ... i have made an excel file wherein i hve a command button and when i click that command button, a common dolog box opens and i select a text file, now i have selected a text file, i want to import it into excel,,how would i do that i have attached the file... please let me know thanks Attachment filename: vikrama.xls Download attachment: http://www.excelforum.com/attachment.php?postid=543522 --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
command to import a file into excel
Sorry, if you want to import it into an existing document, turn on the macro
recorder while you manually do Data=Get External Data = Import Text file and import a text file. Then turn off the macro recorder and replace the hardcoded file name with the variable fName or whatever variable holds the fully qualified name of the file. -- Regards, Tom Ogilvy "vikram " wrote in message ... i have made an excel file wherein i hve a command button and when i click that command button, a common dolog box opens and i select a text file, now i have selected a text file, i want to import it into excel,,how would i do that i have attached the file... please let me know thanks Attachment filename: vikrama.xls Download attachment: http://www.excelforum.com/attachment.php?postid=543522 --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I import text file of cash flow to excel file then use formula | Excel Discussion (Misc queries) | |||
import file so that it is a actual csv file, no excel cell version | New Users to Excel | |||
import data from txt file to an existing excel file | Excel Discussion (Misc queries) | |||
How come I can't import an .svc file(Open Office) to Excel file? | Excel Discussion (Misc queries) | |||
import csv fiel from command line | Excel Discussion (Misc queries) |