Announcement

Collapse
No announcement yet.

Error 438 : Object doesn't support this property or method

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error 438 : Object doesn't support this property or method



    Hi! I am trying to use the below codes to extract data from a cell on excel to web search but I keep getting Error 438. Can anyone please help?



    Code:
    Dim IE As Object
    
    Sub SICsearch()
    
    
    Application.ScreenUpdating = False
    
    
    Set IE = CreateObject("InternetExplorer.Application")
    IE.Visible = True
    IE.Navigate "https://julac.hosted.exlibrisgroup.com/primo-explore/search?vid=HKALL"
    
    
    Application.StatusBar = "Submitting"
    ' Wait while IE loading...
    While IE.Busy
    DoEvents
    ActiveCell.Select
    Selection.Copy
    Wend
    ' **********************************************************************
    delay 1
    IE.Document.getElementById("searchBar").Value = ActiveCell.Value
    delay 1
    IE.Document.getElementById("searchBar").Paste
    delay 2
    IE.Document.getElementById("Submit search").Click
    '**********************************************************************
    
    
    End Sub
    
    
    Private Sub delay(seconds As Long)
    Dim endTime As Date
    endTime = DateAdd("s", seconds, Now())
    Do While Now() < endTime
    DoEvents
    Loop
    End Sub


    Thank you very much!
    Last edited by AlanSidman; 2 weeks ago.

  • #2


    Code Tags Added
    Your post does not comply with our Forum RULES. Use code tags around code.

    Posting code between tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window.

    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan

    Did you debug your code first? http://www.cpearson.com/excel/DebuggingVBA.aspx
    FORUM RULES----->http://www.ozgrid.com/forum/announcement.php?f=8

    If someone has helped you, say "thank you" by clicking on the Like Button.

    Comment

    Working...
    X