![]() |
TextImportWizard & VBA
Hi
I'd like to open a text file with a vba script. Is it possible to open the file using the TextImportWizard? Tom |
TextImportWizard & VBA
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 |
TextImportWizard & VBA
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 |
TextImportWizard & VBA
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 |
All times are GMT +1. The time now is 05:50 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com