dgameman1
Active Member
- Joined
- May 25, 2006
- Sythe Gold
- 0
- Messages
- 122
I am trying to learn how to parse information.
For my first time, I want a messagebox to be able to say
"Example of a simple HTML page"
(http://help.nucleus.com/example_of_a_simple_html_page.htm)
So this is my code
Now how do I make it so that it know what site to go to and how do I also make it so that when I press "Command1" it will parse that information?
For my first time, I want a messagebox to be able to say
"Example of a simple HTML page"
(http://help.nucleus.com/example_of_a_simple_html_page.htm)
So this is my code
Code:
Option Explicit
Private Function GetBetween(ByVal Start As Long, Data As String, _
StartString As String, EndString As String, _
Optional ByVal CompareMethod As VbCompareMethod = vbBinaryCompare) As String
Dim lonStart As Long, lonEnd As Long
'1. Find start string.
lonStart = InStr(1, HTML, "<h1>", vbTextCompare)
If lonStart > 0 Then
'2. Move to end of start string.
lonStart = lonStart + Len("<h1>")
'3. Find end string.
lonEnd = InStr(lonStart, HTML, "</h1>", vbTextCompare)
If lonEnd > 0 Then
'4. Extract data between start and end strings.
GetBetween = Mid$(HTML, lonStart, lonEnd - lonStart)
'Done!
MsgBox GetBetween
End If
End If
End Function
Now how do I make it so that it know what site to go to and how do I also make it so that when I press "Command1" it will parse that information?



