-
HtmlSelectElement Object
Hello Friends,
I am trying to read the contents from a current Internet Explorer Select
tag using the MSHTML object library. I have chosen to use the "SelectedIndex"
property to retrieve a current selection from a "Select" tag. I am using
the following code:
----------------------------------------------------------------------
Dim Doc
Dim myVar As Object
Dim r As Object
Dim S As Object
Dim g_element As Object
Private WithEvents g_document As HTMLDocument
Private Sub Form_Load()
For Each IE In sWs
Set Doc = IE.document
Set g_document = Doc
Next
End Sub
Private Sub g_document_onmouseup()
If TypeOf g_document Is HTMLDocument Then
Set myVar = g_document.activeElement
Debug.Print myVar.selectedIndex.Value
End If
End Sub
-----------------------------------------------------------------------
Question: I am getting the error message: "Object doesn't support this property
or method" What is the proper way to reference this object?
Thanks in advance for your help.
Regards,
JD
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks