+ Reply to Thread
Results 1 to 20 of 20

Selection method of range class failed

  1. #1
    Forum Contributor
    Join Date
    03-28-2013
    Location
    singapore
    MS-Off Ver
    Excel 2010
    Posts
    157

    Post Selection method of range class failed

    Can Someone here help me to improvise this code . i keep getting "Selection method of range class failed" error
    Thank you




    Please Login or Register  to view this content.
    Last edited by joh46k; 07-12-2013 at 03:25 AM.

  2. #2
    Registered User
    Join Date
    07-10-2013
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2007
    Posts
    40

    Re: Selection method of range class failed

    Hi joh46k ,

    First you have to select the workbook then worksheet then worksheet range.

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Selection method of range class failed

    Works fine for me. On which row do you get the error?

    Is your code in a module?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  4. #4
    Forum Contributor
    Join Date
    03-28-2013
    Location
    singapore
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Selection method of range class failed

    I get ERROR on this part. if i click that Budget_Summary sheet code is working but if i didn't select that sheet it is not working. Is possible to change that situation?
    Please Login or Register  to view this content.
    Last edited by joh46k; 07-12-2013 at 03:33 AM.

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Selection method of range class failed

    Is your code in a module?

  6. #6
    Forum Contributor
    Join Date
    03-28-2013
    Location
    singapore
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Selection method of range class failed

    Quote Originally Posted by arlu1201 View Post
    Is your code in a module?

    YES. it is in module .pls help

    If possible helpme to repharse or re-write that code #1 without need to "Select "
    Last edited by joh46k; 07-12-2013 at 03:42 AM.

  7. #7
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Selection method of range class failed

    May be

    Please Login or Register  to view this content.

  8. #8
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Selection method of range class failed

    Hello joh46k,

    Maybe there might be some other issues like merged cells, or something else. Could you please upload a sample of your WorkBook, for us to have a look at?
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  9. #9
    Forum Contributor
    Join Date
    03-28-2013
    Location
    singapore
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Selection method of range class failed

    Quote Originally Posted by AB33 View Post
    May be

    Please Login or Register  to view this content.



    cannot work

  10. #10
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Selection method of range class failed

    joh,
    Please do not reply with quote! Just a reply will do.
    Can not work is your code, not mine, just re-organised it.
    Did you get any error? If not what is not working?

  11. #11
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: Selection method of range class failed

    Protect is a member of Sheet Class.. You cant Protect a Range..

    Try

    Please Login or Register  to view this content.
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  12. #12
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Selection method of range class failed

    If you can not protect a range(As per Debraj's comment)

    Please Login or Register  to view this content.

  13. #13
    Forum Contributor
    Join Date
    03-28-2013
    Location
    singapore
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Selection method of range class failed

    when some letters chose on one sheet , it will lock or protect certain range on another sheet . ?


    For example I have an sheet named FCT_PUB sheet ,(on Row 25)when a letter In Jan 14 "Y" is chose and you click update button. It will go to sheet name called Budget_ summary , it will locked and protect that January month column only . In FCT_PUB sheet ,(on Row 25)If other letters on JAN 14 , clicked "N" or "C" it will be unlocked and un-protected that January month only .


    file is attached Thank you!
    Attached Files Attached Files

  14. #14
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    If you want to protect specific cells you should be looking at the Locked property.
    If posting code please use code tags, see here.

  15. #15
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Selection method of range class failed

    Hello joh46k,

    Is the attached WorkBook perhaps what you are after?

    Also see the "Please consider" note at the bottom of this post.
    Attached Files Attached Files

  16. #16
    Forum Contributor
    Join Date
    03-28-2013
    Location
    singapore
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Selection method of range class failed

    Quote Originally Posted by Winon View Post
    Hello joh46k,

    Is the attached WorkBook perhaps what you are after?
    Thanks for the reply guys , The attachment above i tried before but i don't want something like that

    I want something like ,If i click 'Y' letter IN FCT_pub SHEET , it should only lock or protect Budget summary's that particular month . but above attachment protecting the whole worksheet


    Please help .Thank you
    Last edited by joh46k; 07-14-2013 at 09:37 PM.

  17. #17
    Forum Contributor
    Join Date
    03-28-2013
    Location
    singapore
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Selection method of range class failed

    Bump no response

  18. #18
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Selection method of range class failed

    O.K. I think, the attached is what you want.

    Also see the "Please consider" note at the bottom of this post.
    Attached Files Attached Files

  19. #19
    Forum Contributor
    Join Date
    03-28-2013
    Location
    singapore
    MS-Off Ver
    Excel 2010
    Posts
    157

    Re: Selection method of range class failed

    @Winon : Thank you so much . it is working

  20. #20
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Selection method of range class failed

    You are welcome, glad I could help.

    Thank you for the "Rep".

+ 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