'引用 Microsoft Internet Controls
'
    Dim ShellWeb As New SHDocVwCtl.ShellWindows
    Dim WinObj As Object
    Dim tObj As Object
    Dim i As Long
    
    For i = 0 To ShellWeb.Count
        If ShellWeb.Item(i).LocationName = "在VB中如何得到网页的文本框中的内容?" Then
            Set WinObj = ShellWeb.Item(i).Document
            Exit For
        End If
    Next i
    
    For i = 0 To WinObj.All.length - 1
        Set tObj = WinObj.All.Item(i)
        If tObj.tagname = "TEXTAREA" Then'这里是找到文本框的标签
            If tObj.Name = "" Then'这里可以根据具体情况设置
                MsgBox tObj.Value'显示标签内容:)
            End If
        End If
    Next i