如何在excel中操作字符串 - VB?

mar*_*non 2 excel vba

我想知道是否有人可以告诉我如何从Excel - VB中的以下字符串推断'http://www.nbc.com/xyz'和'我喜欢这个节目'.

谢谢

<a href="http://www.nbc.com/xyz" >I love this show</a><IMG border=0 width=1 height=1 src="http://ad.linksynergy.com/fs-bin/show?id=Loe5O5QVFig&bids=261463.100016851&type=3&subid=0" >
Run Code Online (Sandbox Code Playgroud)

Tim*_*ams 5

Sub Tester()
    '### add a reference to "Microsoft HTML Object Library" ###
    Dim odoc As New MSHTML.HTMLDocument
    Dim el As Object
    Dim txt As String

    txt = "<a href=""http://www.nbc.com/xyz"" >I love this show</a>" & _
         "<IMG border=0 width=1 height=1 " & _
         "src=""http://ad.linksynergy.com/fs-bin/show?" & _
         "id=Loe5O5QVFig&bids=261463.100016851&type=3&subid=0"" >"

    odoc.body.innerHTML = txt

    Set el = odoc.getElementsByTagName("a")(0)
    Debug.Print el.innerText
    Debug.Print el.href

End Sub
Run Code Online (Sandbox Code Playgroud)