+ Reply to Thread
Results 1 to 5 of 5

Paste Range Objects

  1. #1
    Registered User
    Join Date
    10-12-2007
    Posts
    36

    Paste Range Objects

    Hi Guys,

    I'd appreciate some help with the following please.

    I am creating a macro to copy specific columns from one worksheet and paste it into another. I am declaring variables for the ranges, but I dont know how to paste them into my new spreadsheet.

    This is my code:

    Please Login or Register  to view this content.
    The last 2 lines of the code don't work. How can I change it to past the two range objects?

    Thank you
    Chris

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Paste Range Objects

    Change "Let" to "Set"?

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,968

    Re: Paste Range Objects

    You need to actually copy and paste them:
    Please Login or Register  to view this content.
    or resize the destination range and set the Value of one equal to the Value of the other if you don't want all the formatting and formulas etc.
    Everyone who confuses correlation and causation ends up dead.

  4. #4
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Paste Range Objects

    Oh, and get rid of the .Range property, e.g.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-12-2007
    Posts
    36

    Re: Paste Range Objects

    Thanks for the responses chaps. Not much luck tho.

    I get invalid use of property if I remove the .Range!

    Quote Originally Posted by Andrew-R View Post
    Oh, and get rid of the .Range property, e.g.

    Please Login or Register  to view this content.
    Last edited by drchris; 09-29-2010 at 01:05 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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