Hi,
I am reading data from a text file and selecting some lines to write to another text file.
I have a line count going.
After 65 lines, I want to write a page header consisting of 5 lines of text.
There are 5 places in the code that I can reach the 65 lines at and require a page header.
I want a page header routine in one place that I can 'call' it from.
I created something like this in my code as a page header 'routine' [based on the 'On Error GoTo . . .' model]:
Code:
'Code . . .
'Code . . .
If LineCount = 65 Then
GoTo WritePageHeader
WritePageHeader:
'Code to write the 5 Header lines to the output Text file . . .
If I DO use this - how do I get back to where I was in the code when I redirected to the 'WritePageHeader' label?
Is this a bad way to do this?
What is the most efficient way to achieve what I'm trying to do?
I'd appreciate any suggestions.
Thanks!