is this any help?
Code:
Option Explicit
Option Compare Text
Private Sub Command3_Click()
Dim strTitle As String
Dim strTemp As String
strTemp = "<HTML><HEAD><TITLE>Mark Sreeves</TITLE></HEAD><BODY></BODY></HTML>"
strTitle = GetStuffBetween(strTemp, "<title>", "</title>")
End Sub
Private Function GetStuffBetween(strIn As String, OpeningTag As String, ClosingTag As String) As String
Dim i As Integer
Dim j As Integer
i = InStr(strIn, OpeningTag)
j = InStr(strIn, ClosingTag)
If (i > 0) And (j > 0) Then
i = i + Len(OpeningTag)
GetStuffBetween = Mid(strIn, i, j - i)
Else
'decide for your self what you want to do if a tag is missing!
End If
End Function
if you were using a webbrowser control you could do this:
Code:
Private Sub WebBrowser1_TitleChange(ByVal Text As String)
Form1.Caption = WebBrowser1.Document.Title
End Sub