+ Reply to Thread
Results 1 to 3 of 3

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

  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.

    Please Login or Register  to view this content.
    Last edited by rcurious; 05-14-2021 at 02:23 AM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2505
    Posts
    27,227

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

    tbl is a variable that is local to Sub Gordon and so is not in scope for Maybe_So. My first advice is that I strongly recommend to everyone that they use Option Explicit and declare variables. Doing so prevents a lot of bugs and runtime errors and would have caught your error.

    Second, you must make tbl available to Maybe_So. The best practice is to pass it as an argument.


    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

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

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

    Thank you very much! I will study that.

+ Reply to Thread

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