B
Bam
I have a text file which I need to retrieve the last 6 characters from.
The file Is always 2 Lines and looks like this.
RESULT OK
INFORMATION Add Job 185792
I want to retrieve the (Job) Number at the end - "185792".
My current script looks like this:
(Where strTarget is the textfile.)
Open strTarget For Input As #1
Do While Not EOF(1)
Line Input #1, data
Debug.Print Right(data, 6)
Loop
Close #1
The result however comes out like this:
ULT OK
185792
How Do I Only retrieve the 2nd line of this?
And even better put it into a particular Cell.
Eg: MyRow = ActiveCell.Row
Destination:=Worksheets("Sheet 1").Cells(Myrow, 6)
Thanks?
Bam.
The file Is always 2 Lines and looks like this.
RESULT OK
INFORMATION Add Job 185792
I want to retrieve the (Job) Number at the end - "185792".
My current script looks like this:
(Where strTarget is the textfile.)
Open strTarget For Input As #1
Do While Not EOF(1)
Line Input #1, data
Debug.Print Right(data, 6)
Loop
Close #1
The result however comes out like this:
ULT OK
185792
How Do I Only retrieve the 2nd line of this?
And even better put it into a particular Cell.
Eg: MyRow = ActiveCell.Row
Destination:=Worksheets("Sheet 1").Cells(Myrow, 6)
Thanks?
Bam.