+ Reply to Thread
Results 1 to 5 of 5

Visual Basic returning error '438' when writing a value to Internet Explorer

Hybrid View

  1. #1
    Registered User
    Join Date
    01-14-2009
    Location
    Illinois, USA
    MS-Off Ver
    Excel 2002
    Posts
    6

    Visual Basic returning error '438' when writing a value to Internet Explorer

    Hello,

    I am trying to read a value from an excel sheet and write it to a form in an Internet Explorer window. Here is my code:

    Sub innernet()
        Dim IE As Object
        Set IE = CreateObject("InternetExplorer.Application")
        IE.navigate "http://drdoctor.cropsci.uiuc.edu/smallRNA.php"
        IE.Visible = True
        While IE.busy
            DoEvents  'wait until IE is done loading page.
        Wend
        IE.Document.all("form1").Value = Workbooks("myworkbook.xlsx").Worksheets("AllSoy").Cells(3, 3).Value
        IE.Document.all("submit").Click
    End Sub
    The program works up until the 2nd to last line of code (IE.Document.all("form1").Value = ......) which is when it throws me run-time error '438': "Object doesn't support this property or method".

    I am unsure of what is wrong here, and documentation on this topic seems scarce.

    Thank you.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Visual Basic returning error '438' when writing a value to Internet Explorer

    Hello srbloom,

    What is "Form1"? Is this an input box, table, what?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    01-14-2009
    Location
    Illinois, USA
    MS-Off Ver
    Excel 2002
    Posts
    6

    Re: Visual Basic returning error '438' when writing a value to Internet Explorer

    Leith Ross,

    I take "form1" from going to http://drdoctor.cropsci.uiuc.edu/smallRNA.php and looking at the HTML source code. "form1" appears as the form name and id of the form I am trying to write to.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Visual Basic returning error '438' when writing a value to Internet Explorer

    Hello srbloom,

    The connection is timing out. I will have to try later to see this "Form".

  5. #5
    Registered User
    Join Date
    01-14-2009
    Location
    Illinois, USA
    MS-Off Ver
    Excel 2002
    Posts
    6

    Re: Visual Basic returning error '438' when writing a value to Internet Explorer

    It is possible you are not able to access this form publicly. In which case, I have attached a picture of the form on the website.

    And here is the accompanying source code:
    <html>
    <head>
    	<title>Small RNA Search</title>
    </head>
    <body>
    
    <form name="form1" id="form1" action = "smallRNA.php" method="post">
    Enter in a small RNA sequence (no more than 50bps) <br />
    <textarea cols='55' rows='7' name='seq_text' wrap='off'></textarea>
    <input type="submit">
    </form>
    
    </body>
    </html>
    Attached Images Attached Images

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1