+ Reply to Thread
Results 1 to 4 of 4

Object required Error

  1. #1
    Forum Contributor
    Join Date
    04-05-2010
    Location
    Lakewood, IL
    MS-Off Ver
    Excel 2016
    Posts
    384

    Object required Error

    This one is really frustrating. The following code open a text file copies the contents and pastes it into a cell on another spreadsheet.
    Please Login or Register  to view this content.
    I have two problems When I close the "ActiveWorkbook.Close" I get a message that is is a large amount of data on the clip board and I select YES, but I do not what that message. The other bigger issue is when I get to the second the the last line ".PasteSpecial Paste:=xlPasteValues" I get an error. "Run-time error '424': Object required. The workbook "quickImport" is a work book I import earlier in the code.

    Any ideas??
    Last edited by Bobbbo; 12-23-2017 at 11:40 AM.

  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Object required Error

    How about this ?

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  3. #3
    Forum Expert leelnich's Avatar
    Join Date
    03-20-2017
    Location
    Delaware, USA
    MS-Off Ver
    Office 2016
    Posts
    2,807

    Re: Object required Error

    Please Login or Register  to view this content.
    Last edited by leelnich; 12-22-2017 at 08:41 PM.
    Clicking the Add Reputation star below helpful posts is a great way to show your appreciation.
    Please mark your threads as SOLVED upon conclusion (Thread Tools above Post # 1). - Lee

  4. #4
    Forum Contributor
    Join Date
    04-05-2010
    Location
    Lakewood, IL
    MS-Off Ver
    Excel 2016
    Posts
    384

    Re: Object required Error

    Quote Originally Posted by bakerman2 View Post
    How about this ?

    Please Login or Register  to view this content.
    Thanks, it appears since the data that is being pasted is both text and numbers xlPasteValues is causing a failure. I chjanged to the xlPasteAll and it get past the error and the data is pasted correctly

+ 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 Error Message - Runtime Error 424 Object Required
    By jackiea6363 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-26-2017, 04:23 AM
  2. Object Required Error 424 - Why?
    By DwinZly in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-20-2016, 05:36 PM
  3. Getting Object Required error
    By laansesu in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-01-2015, 01:52 AM
  4. Object Required Error
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-12-2014, 10:49 AM
  5. [SOLVED] Simple Calendar pop up macro --> error Run-time error '424': Object required
    By am_hawk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-11-2013, 10:38 AM
  6. Name.Object (Error Object Required)
    By dssrun209 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-12-2010, 01:38 PM
  7. Error 424 Object Required Error when Using AddItem to ListBox Generated in Code
    By jclark419 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-01-2010, 12:47 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