Free Microsoft Excel 2013 Quick Reference

Extract text from string vba Results

Hi can one help in how to extract the text from particular string and paste the string into excel .
the sentence is identified by ;
so once ; is delimited it has to read the text till ; and has to paste in to excel.
it has to accpet all the spaces,other characters and has to paste in excel.
The striing looks like this

	VB:
	
Delete 
From	iw_patstrat_genpact_workdb.TCIND_WORKfebA; 
Delete 
From	iw_patstrat_genpact_workdb.TCIND_WORKfeb2A; 
 
INSERT	INTO iw_patstrat_genpact_workdb.TCIND_WORKfebA 
SELECT	FILL_PHCY_NBR, INVOICE_NBR, REFILL_NBR, RX_PHCY_NBR, RX_NBR, PROTOCOL_REASON_CDE, MESSAGE_1_TXT, 
CUSTOMER_NBR, CAST(PROTOCOL_TMS As Date), 1 
FROM	 eods_proddb_v.protocol_event 
WHERE	PROTOCOL_REASON_CDE = 'TCIND'
AND	CAST(PROTOCOL_TMS As Date) >= '2005-12-01';

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines

i want ouput in this way
OutPut:

	VB:
	
Delete  From	iw_patstrat_genpact_workdb.TCIND_WORKfebA; 
Delete  From	iw_patstrat_genpact_workdb.TCIND_WORKfeb2A; 
INSERT	INTO iw_patstrat_genpact_workdb.TCIND_WORKfebA SELECT FILL_PHCY_NBR, INVOICE_NBR, REFILL_NBR, RX_PHCY_NBR, RX_NBR,
PROTOCOL_REASON_CDE, MESSAGE_1_TXT, CUSTOMER_NBR, CAST(PROTOCOL_TMS As Date), 1 FROM eods_proddb_v.protocol_event WHERE
PROTOCOL_REASON_CDE = 'TCIND' AND CAST(PROTOCOL_TMS AS DATE) >= '2005-12-01';

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines


im tryinng the follwoing code.
but its not working for me


	VB:
	
 
Dim k As Integer 
Dim position As Integer 
Sub ImportData() 
     
    k = 1 
    i = 1 
     
    Filename = "C:Documents and Settingsp54g30DesktopTRC_SQL1.0.txt" 
     
     
    Open Filename For Input As #1 
     
    Do While (Not EOF(1)) 
         ' In this case the file is delimited by ; and contains several lines
         ' Read the file one line at the time
        Input #1, Streng 
         
         'Input streng into and array
        StrArray = Split(Streng, ";") 
         
         
        Call WriteToExcel(StrArray) 
         
        k = k + 1 
         
    Loop 
     
    Close #1 
     
End Sub 
 
Sub WriteToExcel(StrArray) 
     
    For j = LBound(StrArray) To UBound(StrArray) 
         
        Cells(k, 1).Value = StrArray 
         
    Next j 
     
     
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
it was pasting in this way.

	VB:
	
"Delete  From	iw_patstrat_genpact_workdb.TCIND_WORKfebA" 
"Delete  From	iw_patstrat_genpact_workdb.TCIND_WORKfeb2A" 
"INSERT	INTO iw_patstrat_genpact_workdb.TCIND_WORKfebA SELECT FILL_PHCY_NBR" 
INVOICE_NBR 
REFILL_NBR 
RX_PHCY_NBR 
RX_NBR 
PROTOCOL_REASON_CDE 
MESSAGE_1_TXT 
CUSTOMER_NBR 
CAST(PROTOCOL_TMS As Date) 
1 
FROM eods_proddb_v.protocol_event WHERE PROTOCOL_REASON_CDE = 'TCIND' AND CAST(PROTOCOL_TMS AS DATE) >= '2005-12-01'

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
the first two sentences are pasting in two rows correctly.
but the third statement is pasting form row 3 till row 8.which i dont want.
i want to paste the third statement in row 3.

thanks in advance.
krishna

Hi all

I need to extract the text from a string that is always less the last three digits. For example if A1 is abcdefg I always have to take off "efg" and extract the rest of it to the left but the length of the string can vary.

I can be dirty and record a macro where I find the length, subtract 3 and then using the LEFT worksheet function can get my result, but when I come to try to convert that to VBA I get stuck. If anybody could help I would be very grateful. What is the VBA equivalent of LEFT worksheet function and how would I go about using LEN in conjuntion with subtracting 3 from it?

Any suggestions greatly received
Reggie

Hi,
I need to extract just the text from cells which contain both letters and numbers. There can be one or two letters, followed by one, two or three numbers. (For info, these are chemical elements and their masses).

So for instance,a cell could contain anything from the following B9, B11, S32, Ca44, Mo100, I129, Th226, U238 etc etc.

I know I've seen this done before, but I can't find it now.

It also has to be formula based, not using VBA.

Anyone remember how to do this please?

Thanks

Dave

Hi All & Good Day,

I'm student doing my attachment. I've encounter this problem and I really need some help here.
Please kindly help or share any knowlegde if u can. I will be very greatful for any help given. THanks a million in adv.

Problem:

I've this junk of code and what i need to extract is the ItemID after swItem= but there main problem here is i only need the first part which highlight in blue.

Therefore i'm wondering if it's possible to write a VBA which will find the HTML tag

<aclass="udrlinesmall then extract the inform within the which wildcard happen to be <XXXXXXXXXX> and inside the wildcard find the second wildcard which is swItem= then extract the ItemID = "MTX-c380636094ed4c24a5a22b6542" and paste in in a new doc or at the bottom of the doc.

*NOTE : There is more then "swItem=" therefore it need to be inside the <aclass="udrlinesmall xxxxx....> tag

Really thanks everyone in adv. This will be great different in my grade for attachment pls kindly help if can. THANK YOU!

<trbgColor=#e7e7e7>
<tdalign="left"><aclass="udrlinesmall"
href="SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=15351&prodSeriesId=1121474&prodNameId=3279719&swEnvOID=4026&swLang=8&mode=2&taskId=135&swItem=MTX-c380636094ed4c24a5a22b6542">Citrix
XenServer Hot Fix
</a></td>
<tdclass="small" align="left">4.1.0-11501<br>19 Nov 2008</td>
<tdclass="small" align="left">282.8</td>
<tdclass="small" align="left">56K: >8h<br>512K: 1h</td>
<tdclass="small"
align="left"><ahref="SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=15351&prodSeriesId=1121474&prodNameId=3279719&swEnvOID=4026&swLang=8&mode=2&taskId=135&swItem=MTX-772f8a7295c0448c9f333f9d9a"
class="udrline">4.1.0-9514</a><br>15 Jul 2008</td>
<tdalign="left"><formaction="SoftwareDownloadEventHandler.jsp?redirectReason=SWD_FTP_Request&swItem=MTX-c380636094ed4c24a5a22b6542&prodSeriesId=1121474&prodLine=SY&targetPage=ftp%3A%2F%2Fftp.hp.com%2Fpub%2Fsoftlib2%2Fsoftware1%2Fpubsw-windows%2Fp702010714%2Fv50434/hpxs-hotfix-11501-b1.zip&filesize=296496139"
method="post"><inputclass="primButton" type="submit"
value="Download&nbsp;&raquo;" name="download" style="float:left;"
title="Download"
onclick='if(window.s_gs){s_linkType="d";s_lnk=s_co(this);s_linkName="SY-hpxs-hotfix-11501-b1.zip";s_prop2="SY";s_prop4="SOAR-MTX-c380636094ed4c24a5a22b6542";s_prop5="1121474-HP
ProLiant ML370 G5 Server series";s_gs("hphqglobal,hphqWWsupportBSD")}'"/></form></td>
</tr>
</table>


Hi,

I am trying to extract postcodes from a text string, unfortunately the postcode doesn't always appear at the end of the text string.

I'm not sure if this can be done with formulas or whether it requires VBA to accomplish the task.

My aim is to extract the postcode which I would like to appear in column F.

I have attached an example spreadsheet.

Thanks in advance for any help.

Ade

Hello,

Consider the following string-variable which has text assigned as follows:

ClippedStr = "Feb 24 2012 00:37:16 EST"
(always the same structure as above; another example: "Mar 22 2012 00:45:34 EST"

What I'm seeking is a RegEx pattern (or other appropriate VBA Expression - however RegEx gives me flexibility in case ClippedStr has more extraneous data) to extract the date from this string. However, I need the extraction to precisely allocate each element of ClippedStr as follows:

YearX = "2012"
MonthX = "Feb"
DayX = "24

That way, I can assign a date in the format of the local computer using:
DateX = DateSerial(yearX, monthX, dayX)

Here's the code which I need your ideas:


	VB:
	
 Extract_Date() 
     
    Dim YearX As String, MonthX As String, DayX As String, ClippedStr As String 
    Dim DateX As Date, RE As Object, REMatches As Object 
     
    ClippedStr = "Feb 24 2012 00:37:16 EST" 
    Set RE = CreateObject("vbscript.regexp") 
     
    With RE 
        .Global = True 
        .IgnoreCase = True 
         '.Pattern = ?????    '

I have a range of cells that contains data in the form on strings. I need to extract a part of this string and paste it (to the empty cell on the right).

Range "AV" contains the cells with strings
I need to extract the data between "0" OR "0:" and till the end of the string in the cell OR till "1"

Can anyone show me how to do this with a Macro (VBA code) or anyway else ? Thank You

example :

(String in a cell)

shawn012k
0: james
pdf: 321
1:
pdf:
2:
pdf:

Extracted Data (pasted in the cell to the right): james
pdf: 321

I have a column of hyperlinks and what I want to do is the following:
Read the “text” of the hyperlink and grab the text at the end of that string so that I can use the text for further manipulation.
Example: The cell value reads XYZ and the hyperlink for that cell is ToplevelDir1Dir2MyfilesG-12345-1. I need to be able to pull out the string “G-12345-1”. Whereas the levels of directories may change,it will always be the text after the last .

Any suggestions would be appreciated.

--------------------------------------------------------------------------------

I have a range of cells that contains data in the form on strings. I need to extract a part of this string and paste it (to the empty cell on the right).

Range "AV" contains the cells with strings
I need to extract the data between "0" OR "0:" and till the end of the string in the cell OR till "1"

Can anyone show me how to do this with a Macro (VBA code) or anyway else ? Thank You

example :

(String in a cell)

shawn012k
0: james
pdf: 321
1:
pdf:
2:
pdf:

Extracted Data (pasted in the cell to the right):
james
pdf: 321

Hi,

I'm new at this, but really need help to save time on thousands of cells worth of manual work. I need to extract the uppercase words from strings of text. I'll give an example, and show which VBA code I found on my own and how it seemed to get me closer but not all the way there.

Example:

A1: The quick brown Fox Jumps over the lazy dog
A2: The Quick brown fox jumps over the lazy Dog

Ideally in B1: The Fox Jumps
B2: The Quick Dog

I found this code:

Public Function majuscules (zone)
Dim sel As Object
Dim i As Integer
Application.Volatile
For Each sel In zone
    For i = 1 To Len(sel)
        If Asc(Mid(sel, i, 10)) > 64 And Asc(Mid(sel, i, 10)) < 91 Then
            majuscules = majuscules & Mid(sel, i, 1)
        End If
    Next i
Next sel
End Function

.....Which only took the capital letter itself. From the above example:

Outcome B1: TFJ

Any help would be appreciated! Thanks.

Hi!

After a couple of hours fruitless searching I'm in dire need to some assistance. If this was MatLab, I would have fixed this quite fast, but it's not . There are alot of search results for text file string reads, for a specific string, but nothing for a recurring string during an open IO stream and nothing for the more specific string search below.

Goal: To extract a specific line in a big results file, this line occurs after a specific "head line" .

Basically this
....
while file stream is open
pos = get line number for string ("Something")
value = get string value @ pos + 1 //Next line
Cell (x) = value
until end of file
....

This is because the file is built up like this :

[...recurring crap...]

Something

Hi Guys,

First post so hello!

I have been googling and searching forums for a while and havent found a working solution to my problem.

After reading a few threads here I understand you get frustrated with posts just asking for help and not actually including enough detail to provide a sutable awnser so I will try to give as much detail as possible.

I have come across another thread here where there is code posted to read multiple text files in VBA and import specific data to an excel spreadsheet. I have managed to use this code to get the results I desire, however unfortunatly the files I need to extract are also in multiple folders (all under a specific subfolder however).

I'm using the following code..


	VB:
	
 read_text() 
     
     'Set wb = Workbooks.Add
    workingflnm = ActiveWorkbook.Name 
    i = 5 'First row in Active Sheet
    Set fd = CreateObject("Scripting.Filesystemobject") 
    pthnm = "[URL="file://gbdb1012/spparchive/SPP/110822/PRINT"]gbdb1012spparchiveSPP110822PRINT[/URL]" 'Please change to
your desired folder
    Set fs = fd.GetFolder(pthnm) 
    For Each fl In fs.Files 
         
         
        If InStr(1, fl.Name, "eodlog.spp", vbTextCompare) > 0 Then 
             
            Set Txtobj = CreateObject("Scripting.filesystemobject") 
            Set Txtfl = Txtobj.getfile(fl) 
            Set Txtstrm = Txtfl.openastextstream(1, -2) 
            Do While Txtstrm.AtEndOfStream  True 
                rdln = Txtstrm.readline 
                 
                 
                If InStr(1, rdln, "rfsruc", vbTextCompare) > 1 Then 
                    x1 = InStr(1, rdln, "^", vbTextCompare) 
                    x2 = InStr(1, rdln, "^GBVC110007^", vbTextCompare) 
                    Workbooks(workingflnm).Sheets("Log File Extract").Cells(i, 1) = fl.Name 
                     'Construction of Ohms String
                    strg = Mid(rdln, x1 + Len("^"), x2 + Len("") - (x1 + Len("^"))) 'The String picks the character Ohms in
the Line as well
                    Workbooks(workingflnm).Sheets("Log File Extract").Cells(i, 2) = strg 
                    i = i + 1 
                End If 
            Loop 
        End If 
         
    Next 
     
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
This code will pull the data I require from the specified text file in gbdb1012spparchiveSPP110822PRINT

The folder stucture is as follows.

Root Folder
gbdb1012spparchiveSPP

Every Day a new folder is created in a YYMMDD format
gbdb1012spparchiveSPP110822

Within this daily folder is another folder called print, in here is the file i need to pull data from
gbdb1012spparchiveSPP110822PRINT

I need to be able to scan for text files in all the sub folders, i.e.

gbdb1012spparchiveSPP110821PRINT
gbdb1012spparchiveSPP110822PRINT
gbdb1012spparchiveSPP110823PRINT
gbdb1012spparchiveSPP110824PRINT
gbdb1012spparchiveSPP110825PRINT
gbdb1012spparchiveSPP110826PRINT
gbdb1012spparchiveSPP110827PRINT

Obviously this is dynamic and ever changing so I imagine I will need some kind of loop to go though all the folders in the root folder one by one till it reaches the end?

Any suggestions on how I can alter the code to acomplish this?

Many thanks,

I have a column of data in the following format:

Hardware (somethingsmall) otherinfo
Hardware ( somethingdisplaced)
Blackbox item (somethingelse) other info
Service(aservice)

etc

I need to extract the data within the brackets allowing for additional spaces for use in a second query which will search for each individual line item in turn.

For some reason the query does not like searching for the raw data in it's current format so I'm trying to extract the key information for searching instead.

I can do it in excel by:

(Assuming data is in cell V36)

'in colum x
=FIND("(",V36)

'in column y
=FIND(")",V36)

'in column z
=MID(V36,X36+1,Y36-(X36+2))

in column aa
=IF(LEFT(Z36,1)=" ", MID(Z36,2,20),Z36)

I have tried doing this cleverly in VBA and failed and then ended up trying to enter this code in the cells within the VBA code and do it that way but I'm having difficulty in doing this also. Any help would be much appreciated!

Thanks,

Barry

ive search the forums for this particular need and found somthing close but not what i need. i need to write a formula (not VBA) to extract a string of letters which can very in number out of a string of characters in a particular cell.

ex. cell A1= 00abcdefg00-000-00
cell A2 = abcdefg

i've tried different methods but can seem to come up with anything.
can anyone help me.

NGNN

I've attatched an example of what I'm working on for reference, deleting all sensitive information.

I have some experience in programming, so the line of thinking is familiar to me, but I don't have any VBA experience, so this might be a good project to get my feet wet and I just need somebody to walk me through it.

The attatched example sort of says it all. Sheet1 is the original file how it comes (not really any way around how it comes, unfortunately) and Sheet2 is the desired finished product. Basically the process involves creating one column, deleting several rows, deleting a couple of columns, and extracting a relevant number from a complex string (numbers, letters, spaces) header above the section (the "DRG: 17", etc. becomes the number in the first column)

Let me know if you have any insight into how I might better understand these principles and write this script. Any advice would be much appreciated.

Greetings everyone. First time using the site and it looks really neat.

I have a repetitive task that I am attempting to make a macro for. It requires me to scan a column of cells worth of data (characters) for parts of what they contain and place those parts into a variable or string so that I can use an IF statement to place text in another cell.

I used to know someone who could do this via VBA, but I have been unable to reach him.

This sheet is fairly basic. The cells to be scanned are all in one column, they are all four digit numbers and I need to read the first two digits into separate variables.

Example: If the cell has "4101" in it, I want to be able to read the first digit "4" into one variable and the second digit "1" into another variable.

This way I can place text based on either one of those digits into the next cell over with an IF statement and can enclose it into a large loop to do the entire column.

If anyone could walk me through the code to read the cell and extract characters from it so I can do this in the future for different types of cell values, that would be really appreciated.

Hi All
I am currently trying to make an Excel VBA which will extract a table from a PDF File. I got to the point where, if I manually cut and paste the table into a .txt file I can extract it and remake the table.
However I want to be able to access pdf directly from the VBA function. When ever I try this, the words and numbers come out as random characters. I am guessing it is probably compatibility or that I need to access the pdf through another reader.
either way any help would be great, my code I have right now is pasted below for opening the file and separating each word in the file into separate cells.


	VB:
	
 file() 
     
    Dim Filename As String 
    On Error Resume Next 
    Filename = Cells(11, 3) 
    Open Filename For Input As #1 
    If Err  0 Then 
        MsgBox "Not found: " & Filename, vbCritical, "File Location Error" 
        Exit Function 
    End If 
     
    Dim tmpString As String 
    Dim aRow As String 
    Dim X As Integer 
    Dim Y As Integer 
    Dim JSI As String 
    Dim Length As String 
    Dim bRow As Integer 
     
    bRow = 1 
    aRow = 1 
     
    Do Until EOF(1) 
         'Read a line of text
        Line Input #1, tmpString 
         
        Dim newString As String 
         'count # of words in string
        Dim positionIndex As Integer 
        Dim numberOfWords As Integer 
        positionIndex = 1 
         
        For positionIndex = 1 To Len(tmpString) 
            If Mid(tmpString, positionIndex, 1) = Chr(32) Then 
                numberOfWords = numberOfWords + 1 
            End If 
        Next positionIndex 
         
        Dim nextWord As String 
        Dim wordIndex As Integer 
        For wordIndex = 1 To numberOfWords 
            nextWord = ExtractElement(tmpString, wordIndex, Chr(32)) 
            Cells(bRow, wordIndex).Value = nextWord 
        Next wordIndex 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines


Folks, long time lurker, first time poster.

Have been working on creating an Excel app that extracts from a sheet in Excel, and creates a PPT based on things in the columns.

Been working through it, but at the end of my rope, trying to get the connectors to work. Please take a look at the code.. I have tried random things in frustration on the connector bit, so please forgive if its a little messy.

Any help would be appreciated.. I can add the connector, just setting the end and starting points is where I get the type mismatch. The names in quotes are the names I have given the shape as the shapes are created..

I need to first create all the shapes, and then connect them..

All examples I find are for people doing this in PPT, so they do things like Activesheet.select etc, which I cannot do since I am creating this from Excel.. (so I believe)


	VB:
	
 
Dim PPT As PowerPoint.Application 
Set PPT = New PowerPoint.Application 
Set PPT = CreateObject("Powerpoint.Application") 
Set pres = PPT.Presentations.Add 
Set slide1 = pres.Slides.Add(1, ppLayoutBlank) 
Dim oName 
Dim Title 
Dim Objective 
Dim Influ 
Dim Coach 
Dim Who 
Dim Pref 
Dim Role 
Dim whoInfluence 
Dim whoInflueneces 
Dim Alignment 
Dim Message 
Dim shapeid 
PPT.Visible = True 
Dim shapename 
Dim sAA As Shape 
 
 
Range("A2").Select 
 
 
Do While Not IsEmpty(ActiveCell.Offset(0, 0)) 
     
    oName = ActiveCell.Value 
    Title = ActiveCell.Offset(0, 1).Value 
     
    If ActiveCell.Offset(0, 3).Value = "High" Then Influ = 50 
    If ActiveCell.Offset(0, 3).Value = "Medium" Then Influ = 180 
    If ActiveCell.Offset(0, 3).Value = "Low" Then Influ = 300 
     
    shapeid = ActiveCell.Row - 1 
    Dim shapelist() As String 
     
     '           With pres.Slides(1)
     '               .Shapes.AddShape msoShapeRectangle, 50 + (shapeid * 5), Influ, 100, 75
    With pres.Slides(1) 
        With .Shapes.AddShape(msoShapeRectangle, 50 + (shapeid * 5), Influ, 100, 75) 
             
            .Name = oName 
             
        End With 
    End With 
    With slide1.Shapes(shapeid).TextFrame.TextRange 
        .Text = oName & vbCrLf & Title & vbCrLf & ActiveCell.Offset(0, 3).Value 
        With .Font 
            .Name = "Arial" 
            .Size = 10 
            .Bold = msoTrue 
            .Italic = msoFalse 
        End With 
    End With 
    slide1.Shapes(shapeid).TextFrame.TextRange.Text = slide1.Shapes(shapeid).TextFrame.TextRange.Text & vbCrLf & " APPEND
TEST" 
    MsgBox oName + Title 
     
    ActiveCell.Offset(1, 0).Select 
     
Loop 
Dim rect1 
Dim rect2 
 
Range("A2").Select 
Do While Not IsEmpty(ActiveCell.Offset(0, 0)) 
    If ActiveCell.Offset(0, 8).Value  "" Then 
        MsgBox "in" 
         '    With pres.Slides(1).AddConnector(msoconnectorformat)
         '    .ShapeRange.ConnectorFormat.BeginConnect .Shapes(ActiveCell.Value), 1
         '    .ShapeRange.ConnectorFormat.EndConnect .Shapes(ActiveCell.Offset(0, 8).Value), 2
         '    End With
         
         'Set myDocument = pres.Slides(1)
         ''
         'Set s = myDocument.Shapes
         'rect1 = ActiveCell.Value
         'rect2 = ActiveCell.Offset(0, 8).Value
         '
         '
         'With s.AddConnector(msoConnectorCurve, 0, 0, 100, 100).ConnectorFormat
         '
         '    .BeginConnect ConnectedShape:="Timothy timms", ConnectionSite:=1
         '
         '    .EndConnect ConnectedShape:="Bob Roberts", ConnectionSite:=1
         '
         '    .Parent.RerouteConnections
         
        Set shpFrom = slide1.Shapes.Shape("Bob Roberts") 
        Set shpTo = slide1.Shapes.Shape("Timothy Timms") 
        With pres.Slides(1) 
            With .Shapes.AddConnector(msoConnectorStraight, 108#, 125#, 2#, 49#).ConnectorFormat 
                .EndConnect slide1.Shapes.Shape("Bob Roberts"), 1 
                .BeginConnect slide1.Shapes.Shape("Timothy Timms"), 3 
                .Parent.RerouteConnections 
            End With 
        End With 
         
         
    End If 
    ActiveCell.Offset(1, 0).Select 
Loop 
 
 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines


Hi All,

Excel user for many years but just getting into VBA code to control Excel.

I would like to use VBA code to do the following. (Have struggled to find relevant solution online, hope someone can help)

I have a series of sub-directories with some of the sub-directories having mulitple *.html files in them. I would like excel(VBA code) to search this subdirectory structure from it's highest level and when it comes across a html file Open it.

I then need it to find text represented in the example below as XXXX located between "makeHeader>" and "

I have some Excel spread sheets that need to be suplemented with data from a text file. Note that only small snippets of data are needed from the text file. The text file can be several megabytes in size and I do not want to import it into Excel. The help in Excel and the Visual Basic editor are not sufficient for what I am after. Here is the essentials of what I have so far:

Code:
Dim Log_FS As Variant
Dim Log_FileStream As Variant

Log_File_Name = Application.GetOpenFilename("Text Files (*.log),*.log)")
If Log_File_Name = False Then
    MsgBox "No file selected"
    Exit Sub
Else
'  MsgBox "You chose: " & Log_File_Name
End If

Set Log_FS = CreateObject("Scripting.FileSystemObject")
Set Log_FileStream = Log_FS.OpenTextFile(Log_File_Name, Read_Only)
' ...

Log_Data = Log_FileStream.ReadLine

SLAVE_Index = InStr(1, Log_Data, "SLAV:AZEL", vbTextCompare)
This (along with additional code) works in my debugger and provides the data I need. In the above example, I can use slave index and the mid string function to extract what I need from the file.

However, I don't really know what I have created with the CreateObject and OpenTextFile statements. (don't ask where I came up with this code. I hunted around and F1'ed everywhere until I derived it.)

My question: How do I detect EOF (End of File). When I put my cursor on the OpenTextFile statement and press F1 to find out something about it and maybe select "See Also", Help says Keyword not found. (They've got to be kidding)

I have a Sam's Visual Basic book and "Writing Excel Macros" and neither has these key words in any context that approaches what I am doing here.

So:
1: How do I detect EOF?
2: What keyword can I use to solicit useful help information from the VBA editor found with Excel?