+ Reply to Thread
Results 1 to 6 of 6

"Object required" error upon "Exit Function" statement

Hybrid View

  1. #1
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: "Object required" error upon "Exit Function" statement

    Exit Function 'unnecessary
    I believe it is necessary, otherwise the Else clause will execute.
    Entia non sunt multiplicanda sine necessitate

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

    Re: "Object required" error upon "Exit Function" statement

    Quote Originally Posted by shg View Post
    I'm surprised that compiles; the invocation of OpenProject doesn't agree with OpenProject's signature.
    Thanks for finding that! I am surprised it compiles, too. I am also surprised that it fails on the Exit Function statement, of all places. But your fix worked.

    Quote Originally Posted by shg View Post
    Exit Function 'unnecessary
    I believe it is necessary, otherwise the Else clause will execute.
    On review I think that final Exit Function is indeed unnecessary since it is the last line of code in the function. I think it must be an artifact leftover from when it was followed by some other code.

+ 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. [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
  2. Replies: 35
    Last Post: 01-13-2016, 02:16 AM
  3. [SOLVED] How to Count number of "Error" and "OK" after the word "Instrument" found in table row
    By eltonlaw in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-17-2012, 06:26 AM
  4. "The "sheets" method from the "_Global" object have failed."
    By mankit87 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-08-2011, 08:53 AM
  5. Error msgs: "Object varible or with block variable not set"; "subscript out of range"
    By menyanthe in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-26-2009, 04:58 PM
  6. Replies: 3
    Last Post: 12-14-2006, 01:36 PM
  7. [SOLVED] What is Error "Method "Paste" of object "_Worksheet" failed?
    By vat in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-17-2006, 04:10 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