Results 1 to 3 of 3

Why I get "Object required" debug error (Beginner level)

Threaded View

  1. #1
    Registered User
    Join Date
    07-03-2010
    Location
    Lithuania
    MS-Off Ver
    Excel 2016
    Posts
    83

    Why I get "Object required" debug error (Beginner level)

    Hello,
    I get "Object required" debug error for line: "arrData = tbl.Data", 7th from bottom.
    after I started calling Maybe_So method. What I have to write, where to declare object and what object?
    Thank you.

    Sub Gordon()
    Dim bot As New ChromeDriver, tbl As TableElement
    bot.Get "http://site.com"
    
    bot.FindElementByName("tbLoginName").SendKeys ("*******")
    bot.FindElementByName("tbPassword").SendKeys ("*******")
    
    bot.FindElementByName("btnLogin").Click
    
    bot.FindElementByName("ctl00$box_11$tbQuickSearch").SendKeys Sheet1.Cells((Sheet2.Cells(1, 3)), 2)
    bot.FindElementByName("ctl00$box_11$btnQuickSearch").Click
    
    bot.FindElementByXPath("//*[@id='sM_uq_id_0']/div[2]/h2/a").Click
    cAge = bot.FindElementByXPath("//*[@id='main_head_container']/h1").Text
    
    ThisWorkbook.Sheets("Sheet2").Range("A5").Value = cAge
    
    bot.FindElementByXPath("//*[@id='partscatalogoue_article_tab']/ul/li[3]").Click
    Set tbl = bot.FindElementByClass("partoecodescontrol").AsTable
    
    Call Maybe_So
    
    End Sub
    
    
    Sub Maybe_So()
    Dim arrData(), arr1, i As Long
    arrData = tbl.Data
    ReDim arr1(1 To UBound(arrData) - 1)
        For i = 2 To UBound(arrData)
            arr1(i - 1) = arrData(i, 2)
        Next i
    ThisWorkbook.Sheets("Sheet2").Range("B5") = Join(arr1, ", ")
    End Sub
    Last edited by rcurious; 05-14-2021 at 02:23 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA code showing error "Run time error 424 object required"
    By keshavtale in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-14-2021, 09:58 AM
  2. Return Value of CheckBox object in a worksheet. Error "Object Required"
    By virgilio in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-16-2020, 03:25 PM
  3. [SOLVED] CommandButton1.Backcolor = Number, Getting / Run time error "424" Object Required
    By Harvey3 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-18-2019, 07:33 PM
  4. "Object required" error upon "Exit Function" statement
    By 6StringJazzer in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-24-2018, 06:40 PM
  5. [SOLVED] "ActiveWorkbook.Path" fails - triggers "Compile Error Object required"
    By Ochimus in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-15-2018, 02:58 PM
  6. WINS Office Integration "System error Object required"
    By aprildu in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 2
    Last Post: 09-20-2018, 07:19 PM
  7. [SOLVED] Macro generates the following error: "run-time error 424 object required"
    By Metrazal in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-23-2014, 06:31 PM

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