LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.programming
GS GS is offline
external usenet poster
 
Posts: 364
Default How to open the //Text Import Wizard// from within a macro?

Hi Erland,

<<If all your textfiles have fixed width columns you could try
the bottomlast -else- part of my macro
'** I usually import the textfiles with the default settings in the Import
Wizard. For example, when the wizard opens I just click Finish. I did add a
line to both procedures to autofit the columns though.


<<just discovered the second flaw in my code: -the first and obvious is the
blank workbook with one sheet left behind if choosing cancel in the open file
dialog
'** With my multi-select code, if the user cancels, nothing happens.
'** With the single-select code, if the user cancels, the active sheet gets
moved to the end. I will add the same check to see if the user cancelled.
-Thanks for pointing this out.


<<if the is macro run first thing after excel startup, the first textfile
replaces the default empty book1 at startup, and is not collected together
with the rest of the files
'** With both procedures, it is assumed the active workbook is a saved file.
If you're putting these into a new file then save the default Book1
beforehand. -Sorry I did not mention this, but my understanding was you are
periodically inserting textfiles into an existing workbook.

Regards,
Garry

 
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Start Excel in Text Import Wizard for data import rlelvis Setting up and Configuration of Excel 0 July 10th 08 08:40 PM
How do I call up the Text Import Wizard via a macro. Computer, call me if you have a problem Excel Worksheet Functions 4 October 11th 07 10:06 PM
Import text wizard in a macro Dennis Vlasich Excel Programming 3 June 21st 04 11:24 PM
Creating a macro to use the text import wizard abxy[_2_] Excel Programming 3 January 11th 04 12:43 AM
Use VBA code to open a text file with the import wizard George Wilson[_2_] Excel Programming 2 September 10th 03 07:55 PM


All times are GMT +1. The time now is 12:31 AM.

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"