+ Reply to Thread
Results 1 to 5 of 5

VBA Archive and Clear Range

  1. #1
    Forum Contributor
    Join Date
    05-01-2018
    Location
    Maine
    MS-Off Ver
    2010
    Posts
    110

    VBA Archive and Clear Range

    Hello all.

    I am having an issue with a code and I would appreciate any help or guidance. I have this code that is supposed to:

    1. Copy row with "True" in Column Y on the "Main" sheet
    2. Paste data in first empty row on "Archive" sheet
    3. Clear range A:X on original row (not deleting it, just erasing content)
    4. Message Box

    In this form it is archiving (moving to other sheet and erasing the data) of all the data on the "Main" sheet. It is supposed to just perform this function on the row that has "True". Any help would be greatly appreciated.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,393

    Re: VBA Archive and Clear Range

    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Contributor
    Join Date
    05-01-2018
    Location
    Maine
    MS-Off Ver
    2010
    Posts
    110

    Re: VBA Archive and Clear Range

    Thank you for the code. I appreciate your time. It is actually erroring out on line

    Please Login or Register  to view this content.
    The error is "Run-time error '1004': Copy method of Range class failed". I tried to remove the (Target) area and replace it with the line above it but its the same error?

  4. #4
    Forum Guru
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,393

    Re: VBA Archive and Clear Range

    Ok Try this version

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    05-01-2018
    Location
    Maine
    MS-Off Ver
    2010
    Posts
    110

    Re: VBA Archive and Clear Range

    Perfect. This worked just like I needed. Just added a +1 to the row number and it is perfect. Thank you so much for the help.

+ 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. Archive row from sheet1 to archive
    By jamie123456 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-18-2017, 04:10 PM
  2. [SOLVED] Error 1004 Method range of object when trying to clear range selection
    By shoulddt in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-15-2017, 10:09 PM
  3. Excel VBA Archive Monthly Account Returns to an Archive File
    By cmarenco in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-31-2016, 10:12 PM
  4. VBA Multiple Check box copy range to 'archive tab'
    By hydrojoe in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-08-2014, 10:24 AM
  5. Clear range based on cell value - clearing cells out of specified range
    By CADiphile in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-15-2013, 02:48 PM
  6. Replies: 1
    Last Post: 06-21-2013, 04:05 AM
  7. Copy a range form one sheet to a new Workbook (for archive)
    By crycx in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-12-2013, 03:53 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