+ Reply to Thread
Results 1 to 6 of 6

Copying RANGE to next blank row of a different sheet each time data generated

  1. #1
    Registered User
    Join Date
    01-24-2022
    Location
    Manchester
    MS-Off Ver
    Office 2013, Office 365
    Posts
    8

    Question Copying RANGE to next blank row of a different sheet each time data generated

    Hello Everyone, quite new to VBA and it has taken me quite a while to get to this point.

    First worksheet shows button 'Get Outlook Data' when clicked you choose an Outlook folder then the data is posted to the 'Outlook Results' sheet.

    Each time the macro runs it clears the data from 'Outlook Results' this is required. The data is currently in columns A - K (this will no doubt be extended).

    However, each time the [GetMailInfo] is run (on a button) I need to be able to paste the data to the next blank row on the 'Results History' sheet each time the macro runs.

    I've attached a sample workbook.

    I used the code found on this forum (noted below) but no matter where I placed it, it wasn't copying to the 'Results History' sheet. Would be great to run this automatically after [GetMailInfo].

    My question, where and how do I get the macro below to automatically run after the 'GetMailInfo' macro is run. Help really appreciated thank you.

    Please Login or Register  to view this content.
    Please any help guidance whatsoever for this is greatly appreciated!!

    Regards,
    Cozza22
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copying RANGE to next blank row of a different sheet each time data generated

    Just add the name of the sub before the sub ends

    Please Login or Register  to view this content.
    Amended copydata code

    Please Login or Register  to view this content.

  3. #3
    Forum Expert CheeseSandwich's Avatar
    Join Date
    12-22-2021
    Location
    Kent, England
    MS-Off Ver
    365 - 2402-17328.20068
    Posts
    1,360

    Re: Copying RANGE to next blank row of a different sheet each time data generated

    I also found that it was copying the header each time so i changed:
    Please Login or Register  to view this content.
    To
    Please Login or Register  to view this content.
    Many different ways to achieve that part though, above is just one.
    Last edited by CheeseSandwich; 01-25-2022 at 09:04 AM.

  4. #4
    Registered User
    Join Date
    01-24-2022
    Location
    Manchester
    MS-Off Ver
    Office 2013, Office 365
    Posts
    8

    Re: Copying RANGE to next blank row of a different sheet each time data generated

    Great and thanks for the prompt response AB33.

    Seems simple for you but sure I'll close this off soon once tested.

    Many thanks again.

    Cozza22
    Last edited by Cozza22; 01-25-2022 at 12:10 PM. Reason: Note

  5. #5
    Registered User
    Join Date
    01-24-2022
    Location
    Manchester
    MS-Off Ver
    Office 2013, Office 365
    Posts
    8

    Re: Copying RANGE to next blank row of a different sheet each time data generated

    Thanks for the additional info.

  6. #6
    Registered User
    Join Date
    01-24-2022
    Location
    Manchester
    MS-Off Ver
    Office 2013, Office 365
    Posts
    8

    Re: Copying RANGE to next blank row of a different sheet each time data generated

    Hi AB33,

    Perfect all working as I wish.

    Many thanks and have a good day.

    Will close this off now.

    Cozza22

+ 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] Copying data from one sheet to other in the same workbook is taking too long time
    By Saritha123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-13-2021, 08:19 AM
  2. [SOLVED] Copying non-blank cell data into another sheet
    By 99problems in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-30-2015, 09:14 PM
  3. [SOLVED] Problem with copying data from system generated spreadsheet
    By Stephen R in forum Excel General
    Replies: 1
    Last Post: 12-16-2014, 06:15 PM
  4. Adding time and copying rows of data to a separate sheet
    By Bootface in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-01-2014, 08:07 AM
  5. Run-time error '5' when copying range of cells to different sheet
    By Meriwether in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-27-2014, 02:55 PM
  6. copying data to a blank sheet
    By steveg666 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-06-2013, 09:36 AM
  7. Data Copying for an input date range to another sheet
    By meetbhupen in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-25-2010, 11:45 PM

Tags for this Thread

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