Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Tom is offline
external usenet poster
 
Posts: 44
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Tom is offline
external usenet poster
 
Posts: 44
Default 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






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default 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








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"