TextImportWizard & VBA

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

Hi

I'd like to open a text file with a vba script. Is it possible to open the
file using the TextImportWizard?

Tom
 
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'...
 
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
 
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...
 
Back
Top