-
I have been at this for 8 hours straight and its 2 in the morning :(
Basically I am reading web page objects as part of an automation tool, but just for testing heres an example.
<Begin VB Code>
Dim mDoc As HTMLDocument
Dim mFrame As HTMLDocument
Dim mForm As HTMLFormElement
Dim mInput As HTMLInputElement
Set mDoc = mIE.document
Set mFrame = mDoc.frames.Item(4).document <-- Type Mismatch
Set mForm = mFrame.Forms.Item("SearchPeople")
Set mInput = mForm.Item("Search")
mInput.Value = "Hello"
<End VB Code>
Now this works fine on my development machine, but on the production machine fails with a Type Mismatch (indicated). Now if I change the declaration of mFrame to a variant it works fine. I am pretty sure an HTMLDocument object is being returned in mFrame.
Is there any way of displaying an object type/class that is applied when defining an object as a variant..?
Anyone got any ideas...?
Thanks, Goodnight.. ;)
-
try
Debug.Print TypeName(mDoc.frames.Item(4).document)