+ Reply to Thread
Results 1 to 8 of 8

comment based on cell value in protected sheet

  1. #1
    Registered User
    Join Date
    11-06-2014
    Location
    India
    MS-Off Ver
    7
    Posts
    19

    comment based on cell value in protected sheet

    I used following vba for comment based on cell value, but when sheet is protected its not working (message .. Run time error '91': prompting for debug)

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    please guide where I am wrong
    Last edited by AliGW; 07-18-2018 at 02:10 AM. Reason: Code tags amended.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,343

    Re: comment based on cell value in protected sheet

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: comment based on cell value in protected sheet

    To be strictly correct since there are several discrete procedures you should have wrapped each one within its own CODE tags.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    11-06-2014
    Location
    India
    MS-Off Ver
    7
    Posts
    19

    Re: comment based on cell value in protected sheet

    Can you modify it. I don't know vba just copy pasted from someehere.

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: comment based on cell value in protected sheet

    Quote Originally Posted by anil.kut View Post
    Can you modify it. I don't know vba just copy pasted from someehere.
    This is nothing to do with Excel or VBA

    This is all about how you present information in the forum. We require code to be surrounded by code tags since it makes reading it much easier. We don't care where you copied it from. We do care that you take the trouble to select the code in the forum post and click the # icon to create the tags.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,343

    Re: comment based on cell value in protected sheet

    I did it for the OP this time, but you are right, Richard: if the OP wants us to spend time on his query, then he needs, at the very least, to be prepared to present his posts in the way we expect them to be presented. I would not wish to accuse him of laziness in this thread, but post #4 does not fill me with confidence!

  7. #7
    Registered User
    Join Date
    11-06-2014
    Location
    India
    MS-Off Ver
    7
    Posts
    19

    Re: comment based on cell value in protected sheet

    Hi AliGw,

    I think there is something lacking in my post. If you can tell me I can correct.
    All I wanted that the comment in a particular cell should take content from some other dynamic cell and this should hold good in protected sheet too.

    Thanks for support.

  8. #8
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent SAC
    Posts
    8,885

    Re: comment based on cell value in protected sheet

    Add code to unprotect the sheet, change the comment, then reprotect.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 10
    Last Post: 05-22-2018, 03:04 PM
  2. VBA Code to unlock cells on a protected sheet based on cell value in another worksheet
    By mr_irrelevant in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-13-2014, 04:02 PM
  3. Insert cell comment on a protected sheet
    By LAF in forum Excel General
    Replies: 4
    Last Post: 07-22-2009, 05:49 AM
  4. Replies: 1
    Last Post: 07-25-2006, 08:20 AM
  5. [SOLVED] Adding a Comment on a protected sheet
    By Sean in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-18-2006, 02:05 PM
  6. [SOLVED] How do I insert a comment in unlocked cell of a protected workshee
    By TD_Anne in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-16-2006, 03:30 PM
  7. [SOLVED] Comment and autofilter in cell of protected sheet
    By Hall in forum Excel General
    Replies: 1
    Last Post: 04-25-2005, 08:06 PM

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