none
VBA Code to unprotect worksheet keeps prompting unwanted MS Office "worksheet protected" pop up box RRS feed

  • Question

  • I'm not sure if I'm even in the right place to ask this question, but I have the below simple VBA code to unprotect my Excel worksheet when the user clicks a radio button, refilter the list, jump to a certain range, then protect the worksheet.

    The problem is this annoying MS Office message box keeps popping up that states the worksheet is protected.  When the user clicks OK on the pop up box the macro runs as it should, but I don't want the pop up box to appear at all.  How can I stop it?

        ActiveSheet.Unprotect
        ActiveSheet.Range("$A$14:$C$414").AutoFilter Field:=2, Criteria1:="2"
        Range("D37").Select
        ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

    Tuesday, November 26, 2019 10:19 PM

Answers

  • Louie130,

    Sorry but you have posted to a forum that deals exclusively with questions/issues about customizing and programming Microsoft Project, a project management application. I suggest you re-post to the following forum, and if you do, you might want to expand your description of the process:

    https://social.msdn.microsoft.com/Forums/Lync/en-US/home?forum=exceldev

    John

    Wednesday, November 27, 2019 1:39 AM