+ Reply to Thread
Results 1 to 4 of 4

The selection is not a range or the sheet is protected please correct and try again

  1. #1
    Registered User
    Join Date
    08-19-2012
    Location
    London, England
    MS-Off Ver
    Excel 2016 in Win 10
    Posts
    97

    Angry The selection is not a range or the sheet is protected please correct and try again

    Any ideas why I am getting this message when I have clearly defined a range and the sheet is unprotected
    Last edited by tigerdel; 06-02-2013 at 11:55 AM.

  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,617

    Re: The selection is not a range or the sheet is protected please correct and try again

    An error on you code maybe?

    What is your code?


    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
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Re: The selection is not a range or the sheet is protected please correct and try again

    Are you selecting the range via code, or via sheet interaction (mouse + CtrlClick)? If the former, is the range non-contiguous?

    Assume range is A1, B1, D1, F1

    One would think the following is correct:
    Please Login or Register  to view this content.
    when in fact the range should be passed as one argument using commas like this:
    Please Login or Register  to view this content.
    Just a thought.
    Perhaps it was the Noid who should have avoided me...
    If you are satisfied with my solution click the small star icon on the left. Thanks
    1. Make a copy of your workbook and run the following code on your copy (just in case)
    2. With excel open, press ALT+F11 to open the Visual Basic Editor (VBE). From the "Insert" menu, select "Module".
    3. Paste the code from above into the empty white space. Close the VBE.
    4. From the developer tab, choose "Macros", select the Sub Name, and click "Run".

  4. #4
    Registered User
    Join Date
    08-19-2012
    Location
    London, England
    MS-Off Ver
    Excel 2016 in Win 10
    Posts
    97

    Re: The selection is not a range or the sheet is protected please correct and try again

    Thanks Guys - sorted

+ 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