Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I'd like to open a text file with a vba script. Is it possible to open the file using the TextImportWizard? Tom |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom,
Works like a champ. And you can record your actions to create the vba. Post back if you have problems. Include the type of text - how it is delimited, etc... I have code that opens the Open dialog to help me select one or more files. It than opens each and converts each to an Excel file. My files are tab delimited. You can even include formatting and 'other stuff'... -- sb "Tom" wrote in message ... Hi I'd like to open a text file with a vba script. Is it possible to open the file using the TextImportWizard? Tom |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I use the following code:
Workbooks.OpenText FileName:=strFile This code automatically opens the textfile, but what is if the textfile contains different text deliminators? In this case the file should be opened with the TextImportWizard. Tom "steve" schrieb im Newsbeitrag ... Tom, Works like a champ. And you can record your actions to create the vba. Post back if you have problems. Include the type of text - how it is delimited, etc... I have code that opens the Open dialog to help me select one or more files. It than opens each and converts each to an Excel file. My files are tab delimited. You can even include formatting and 'other stuff'... -- sb "Tom" wrote in message ... Hi I'd like to open a text file with a vba script. Is it possible to open the file using the TextImportWizard? Tom |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom,
I agree. Your code left all the """" and "," in my open. Need to go back to the code you gave me a long time ago to open with the GetOpenFilename followed with a wizard code. Darn! Thought I could shorten my code... -- sb "Tom" wrote in message ... I use the following code: Workbooks.OpenText FileName:=strFile This code automatically opens the textfile, but what is if the textfile contains different text deliminators? In this case the file should be opened with the TextImportWizard. Tom "steve" schrieb im Newsbeitrag ... Tom, Works like a champ. And you can record your actions to create the vba. Post back if you have problems. Include the type of text - how it is delimited, etc... I have code that opens the Open dialog to help me select one or more files. It than opens each and converts each to an Excel file. My files are tab delimited. You can even include formatting and 'other stuff'... -- sb "Tom" wrote in message ... Hi I'd like to open a text file with a vba script. Is it possible to open the file using the TextImportWizard? Tom |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|