Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Text Import Wizard Breaklines


When I import a text file and use set widths, there are already preset line
breaks there. Is there a way to set the default location for these lines? I
import text files every day, and have to move the breaks that are there. It
would be much faster to have these preset where I want them. Any hlep would
be great.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Text Import Wizard Breaklines


If you were using a vba macro, you could automate the whole import. Have you
considered that?
--
future_vba_expert


"balterson" wrote:

When I import a text file and use set widths, there are already preset line
breaks there. Is there a way to set the default location for these lines? I
import text files every day, and have to move the breaks that are there. It
would be much faster to have these preset where I want them. Any hlep would
be great.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Text Import Wizard Breaklines


Use the macro recorder while performing the operations. Then run the macro
each time you import the file. A dialog box can be added to the code to help
you select the file you want to import.

In excel 2003
Tools - Macro - Start Recording.

Import file

stop recording
Tools - Macro - Stop Recording

Go to VBA window by typing ALT-F11. Find macro under Modules in VBA project
window.

"balterson" wrote:

When I import a text file and use set widths, there are already preset line
breaks there. Is there a way to set the default location for these lines? I
import text files every day, and have to move the breaks that are there. It
would be much faster to have these preset where I want them. Any hlep would
be great.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Text Import Wizard Breaklines


I am not sure what you mean. I have use macros all the time, but what is a
VBA macro? There are six different text files that get imported daily into a
it's own separate spreadsheet, and all are named with the date and which
cycle it is. Does a vba macro take that into consideration?

"future_vba_expert" wrote:

If you were using a vba macro, you could automate the whole import. Have you
considered that?
--
future_vba_expert


"balterson" wrote:

When I import a text file and use set widths, there are already preset line
breaks there. Is there a way to set the default location for these lines? I
import text files every day, and have to move the breaks that are there. It
would be much faster to have these preset where I want them. Any hlep would
be great.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Text Import Wizard Breaklines


I believe all macros in Excel are written in VBA (Visual Basic for
Applications). As Joel said in his reply, you can record what you are doing
manually, then next time you don't have to go thru all the steps; you can
just run the macro.
--
future_vba_expert


"balterson" wrote:

I am not sure what you mean. I have use macros all the time, but what is a
VBA macro? There are six different text files that get imported daily into a
it's own separate spreadsheet, and all are named with the date and which
cycle it is. Does a vba macro take that into consideration?

"future_vba_expert" wrote:

If you were using a vba macro, you could automate the whole import. Have you
considered that?
--
future_vba_expert


"balterson" wrote:

When I import a text file and use set widths, there are already preset line
breaks there. Is there a way to set the default location for these lines? I
import text files every day, and have to move the breaks that are there. It
would be much faster to have these preset where I want them. Any hlep would
be great.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default vba


I am tracking with you now. I edit all the time in Visual Basic, just didn't
know what the vba stood for. So what do I put in place of the file name in
order for it to bring up the open box?
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default vba


You need to record one of your text import sessions, then run it as needed.
To do this, you go to Tools, Macro, Record New Macro. It will give it a name
for you, or you can name it. When you are done recording, go to Tools, Macro,
Stop Recording. Then go to Tools, Macro, Macros, click on the macro, and
click on Run. If you want to see the code it created for you, instead of Run,
click Edit. You can then modify the code to make it do other text imports, if
they are similar, or whatever other changes you want. Hope that helps.
--
future_vba_expert


"balterson" wrote:

I am tracking with you now. I edit all the time in Visual Basic, just didn't
know what the vba stood for. So what do I put in place of the file name in
order for it to bring up the open box?

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


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
Text import wizard bug J.W. Zondag Excel Programming 7 April 22nd 08 09:08 AM
Text Import Wizard Duncan Help Excel Discussion (Misc queries) 1 July 27th 06 03:38 PM
Text Import Wizard Duncan Help Excel Discussion (Misc queries) 0 July 27th 06 02:33 PM
Text Import Wizard Al Mackay Excel Programming 1 February 10th 04 10:48 PM


All times are GMT +1. The time now is 06:16 PM.

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

About Us

"It's about Microsoft Excel"