+ Reply to Thread
Results 1 to 3 of 3

Moving Column to Separate Sheet Macro

  1. #1
    Registered User
    Join Date
    05-26-2012
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010
    Posts
    9

    Moving Column to Separate Sheet Macro

    I have recorded the macro and yet it will not perform the task. I am copying a clomun from sheet 1 A2-A351 and pasting it to column B2-B351 in sheet 2. Here is my code:
    Please Login or Register  to view this content.
    However it keeps giving me an error message of "selection method of range class failed" and when I choose to debug it highlights
    Please Login or Register  to view this content.
    I do not know what to adjust or debug because the macro seems simple, Possible solutions anyone to solve my macro anyone?

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,525

    Re: Moving Column to Separate Sheet Macro

    Is Sheet2 protected?

    You could just use:

    Please Login or Register  to view this content.

    However, if the sheet is protected you'll face the same problem


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Moving Column to Separate Sheet Macro

    if that code is in a commandbutton_click event the range you are trying to select is on the same sheet as the button. if the code has previously made another sheet active, it will fail with the error you mention.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

+ 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