Home |
Search |
Today's Posts |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to Start Excel in Text Import Wizard for data import | Setting up and Configuration of Excel | |||
How do I call up the Text Import Wizard via a macro. | Excel Worksheet Functions | |||
Import text wizard in a macro | Excel Programming | |||
Creating a macro to use the text import wizard | Excel Programming | |||
Use VBA code to open a text file with the import wizard | Excel Programming |