+ Reply to Thread
Results 1 to 6 of 6

Allow Macro to Write into Protected Cell

  1. #1
    Valued Forum Contributor
    Join Date
    02-04-2009
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    665

    Allow Macro to Write into Protected Cell

    I have a macro that writes into cells I need protected - SO I made a macro:
    Please Login or Register  to view this content.
    This works great - But when I save the workbook, close it and open it again, if I don't re-run the macro, it won't allow the macro to write into the cell.

    How do I make the change permanent, so the user doesn't have to run "ProtectOpen Macro"?

    Thanks
    Last edited by CRIMEDOG; 08-19-2011 at 10:25 AM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Allow Macro to Write into Protected Cell

    CRIMEDOG,

    Give the following a try:
    Please Login or Register  to view this content.


    Hope that helps,
    ~tigeravatar

  3. #3
    Valued Forum Contributor
    Join Date
    02-04-2009
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    665

    Re: Allow Macro to Write into Protected Cell

    I thought about that - but if the setting UserInterfaceOnly would stay True - I wouldn't needto unprotect - then protect for every macro.

    But you are probably right, thanks for the help.

  4. #4
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Allow Macro to Write into Protected Cell

    Call your macro from the workbook's Open event.

    e.g.
    Doubleclick the ThisWorkBook object in the Project Explorer. If not open, View > Project Explorer. In the code window paste:
    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    02-04-2009
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    665

    Re: Allow Macro to Write into Protected Cell

    Ok - I implemented it with a twist
    I wrote it into a
    WorkBook_Open() macro in the Workbook sheet.
    Instead of Activesheet I used Worksheets("Sheet1").

    Thanks for the idea - don't know why I didn't think about it.

  6. #6
    Valued Forum Contributor
    Join Date
    02-04-2009
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    665

    Re: Allow Macro to Write into Protected Cell

    Kenneth - I was writing my post when you posted the same idea - Great minds, Thanks all!
    Upvotes for everyone!

+ 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