+ Reply to Thread
Results 1 to 4 of 4

Limit scope of Rows(x).Copy to a specfic # of columns

  1. #1
    Registered User
    Join Date
    10-21-2008
    Location
    North Potomac, MD, USA
    Posts
    5

    Limit scope of Rows(x).Copy to a specfic # of columns

    The Rows(TemplateRow).copy statement below puts the entire template row (with all my formulas and formats) into the clipboard memory. Is there an alternative copy syntax that would limit it to, say 65 columns? The purpose of this code is to add a user determined # of rows to a named range, then copy and paste the template formulas into the new blank lines.
    The reason: Once the file is saved by a 2010 user, the .insert Shift:=xldown will intermittently fail for a 2003 user.

    Please Login or Register  to view this content.
    Last edited by PoggiPJ; 06-14-2013 at 01:14 PM.
    Regards,
    Peter Poggi
    North Potomac, Maryland, USA

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Limit scope of Rows(x).Copy to a specfic # of columns

    You could try Resize.
    Please Login or Register  to view this content.
    By the way, I don't see how restricting the no of columns would prevent an error caused by shifting rows down.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    10-21-2008
    Location
    North Potomac, MD, USA
    Posts
    5

    Re: Limit scope of Rows(x).Copy to a specfic # of columns

    I don't see how either, but for some reason the code works in 2010 and not in 2003. I was thinking about resize, but I also need to actually insert new rows into the named range that contains that template row. I neglected to specify that. Will resize do that or will it just paste? I think it will just paste the template

    maybe instead of doing the insert and copy/paste all in one operation, I should separate it into two steps - insert the complete lank rows, then copy and paste the defined # of columns

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Splitting it up probably is a good idea.

+ 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