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.
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.
Hi joh46k ,
First you have to select the workbook then worksheet then worksheet range.
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]
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.
Is your code in a module?
May be
Please Login or Register to view this content.
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] .
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?
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...
If you can not protect a range(As per Debraj's comment)
Please Login or Register to view this content.
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!
If you want to protect specific cells you should be looking at the Locked property.
If posting code please use code tags, see here.
Hello joh46k,
Is the attached WorkBook perhaps what you are after?
Also see the "Please consider" note at the bottom of this post.
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.
Bump no response
O.K. I think, the attached is what you want.
Also see the "Please consider" note at the bottom of this post.
@Winon : Thank you so much . it is working
You are welcome, glad I could help.
Thank you for the "Rep".
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks