+ Reply to Thread
Results 1 to 6 of 6

Copy & Paste Variable data length into summary sheet after last used row

  1. #1
    Forum Contributor
    Join Date
    05-13-2019
    Location
    Halifax, Canada
    MS-Off Ver
    2016
    Posts
    176

    Copy & Paste Variable data length into summary sheet after last used row

    Hi,

    I have got this code which I took from the same title posted earlier. It works fine when the code is run independently but when merged with some other codes, it gives an error message "Run-time error '91': Object variable or With block variable not set". The code is:

    Please Login or Register  to view this content.
    Is the error because of conflict of some declaration. The variables declaration is Ok. Can somebody come up with the solution, please?

    Roshan Shakya
    Last edited by Roshan.Shakya; 07-05-2019 at 11:32 AM. Reason: Inserting tags

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,075

    Re: Copy & Paste Variable data length into summary sheet after last used row

    Sounds like Sheet1 is empty.

    Also please edit your post to include tags, the # icon in the reply/edit window

  3. #3
    Forum Contributor
    Join Date
    05-13-2019
    Location
    Halifax, Canada
    MS-Off Ver
    2016
    Posts
    176

    Re: Copy & Paste Variable data length into summary sheet after last used row

    Sheet1 has data which is dynamic and keeps on changing. Sheet2 already has data that cannot be overwritten and in fact the Sheet1 data has to copy pasted every time interval. The problem is that the copied data from Sheet1 should be pasted in destination Sheet2 after next to last row.

    By the way, I have been able to use the sub procedure (that works independently) by using the Call function. I would definitely appreciate solutions for the error.

    With regards
    Roshan Shakya

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,075

    Re: Copy & Paste Variable data length into summary sheet after last used row

    What line produces the error?

  5. #5
    Forum Contributor
    Join Date
    05-13-2019
    Location
    Halifax, Canada
    MS-Off Ver
    2016
    Posts
    176

    Re: Copy & Paste Variable data length into summary sheet after last used row

    Earlier the following line produced the error, but to my amaze, I am not getting that error now. I am bemused.

    Please Login or Register  to view this content.
    Thanks
    Roshan Shakya
    Last edited by Roshan.Shakya; 07-05-2019 at 11:53 AM. Reason: for correction

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,075

    Re: Copy & Paste Variable data length into summary sheet after last used row

    Glad it's sorted & thanks for the feedback

+ 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] Copy & Paste variable length row using VBA
    By NatalieW12 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-04-2019, 04:38 PM
  2. [SOLVED] Copy & Paste Variable data length into summary sheet after last used row
    By spyac in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-14-2018, 11:31 AM
  3. [SOLVED] Copy and Paste a Variable-Length Range
    By andrewc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-13-2015, 12:46 PM
  4. [SOLVED] copy data from multiple worksheets and paste into summary sheet
    By forquaidian in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-19-2014, 08:27 AM
  5. [SOLVED] Macro-Copy and paste the new data to the next empty row on summary sheet
    By ttn2b in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-14-2014, 12:02 PM
  6. Replies: 1
    Last Post: 03-28-2013, 02:49 PM
  7. Copy two data sets, filter it and paste to summary sheet
    By pauldaddyadams in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-03-2012, 07:15 AM

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