ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pause Macro For Start Row While Parsing a Text File (https://www.excelbanter.com/excel-programming/345167-pause-macro-start-row-while-parsing-text-file.html)

Bill Foster[_2_]

Pause Macro For Start Row While Parsing a Text File
 
It is fairly easy to use the macro recorder to quickly parse a text file
consistently.

But what syntax do I need if I want the macro to pause in order to allow me
to "browse" the file to edit the Start Row of the data in the text file to be
parsed.

For example, I have one report that has two sections. The report varies in
length each time. I only want to import the data beginning at the second
section, row 2485 in today's instance. Tomorrow, if there is little data, I
may want to start at row 75.

Tom Ogilvy

Pause Macro For Start Row While Parsing a Text File
 
The code imports the file. The parameters are specified in the arguments.
There is no provision for viewing the file and selecting a start row. That
is provided in the Text import wizard itself.

So if you want to browse the file in code and not use the text import
wizard, you would have to write the routine to browse it.

--
Regards,
Tom Ogilvy


"Bill Foster" <Bill wrote in message
...
It is fairly easy to use the macro recorder to quickly parse a text file
consistently.

But what syntax do I need if I want the macro to pause in order to allow

me
to "browse" the file to edit the Start Row of the data in the text file to

be
parsed.

For example, I have one report that has two sections. The report varies

in
length each time. I only want to import the data beginning at the second
section, row 2485 in today's instance. Tomorrow, if there is little data,

I
may want to start at row 75.




Bill Foster

Pause Macro For Start Row While Parsing a Text File
 
Thanks Tom.

"Tom Ogilvy" wrote:

The code imports the file. The parameters are specified in the arguments.
There is no provision for viewing the file and selecting a start row. That
is provided in the Text import wizard itself.

So if you want to browse the file in code and not use the text import
wizard, you would have to write the routine to browse it.

--
Regards,
Tom Ogilvy


"Bill Foster" <Bill wrote in message
...
It is fairly easy to use the macro recorder to quickly parse a text file
consistently.

But what syntax do I need if I want the macro to pause in order to allow

me
to "browse" the file to edit the Start Row of the data in the text file to

be
parsed.

For example, I have one report that has two sections. The report varies

in
length each time. I only want to import the data beginning at the second
section, row 2485 in today's instance. Tomorrow, if there is little data,

I
may want to start at row 75.






All times are GMT +1. The time now is 06:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com