Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8620491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:35:36+00:00 2026-06-12T06:35:36+00:00

Hoping to get some help with Excel 2010. I have three visible sheets. On

  • 0

Hoping to get some help with Excel 2010.

I have three visible sheets. On Workbook Open, vba password protects each of the three sheets.

Now, whenever I make a change to any unlocked cell in any sheet, I get 4 protected sheet warning pop-ups. The one that says that the cells are locked and you have to unprotect to edit? That’s all well and good except that I am not editing locked cells. I am editing unlocked cells in other sheets!

Has anyone had this experience? I have played around and two of them can be attributed to each of two sheets. That is to say, when I only protect the first sheet, I get no pop-ups, when I protect only the second, I get 2 and when I protect only the third, I get 2.

Taking out formulas hasn’t made a difference.

Here is the code for the locking:

For Each wSheet In Worksheets

    wSheet.Unprotect Password:="JMP_DST_Lock"

    If wSheet.Visible = True Then
        wSheet.Protect Password:="JMP_DST_Lock", UserInterFaceOnly:=True
        wSheet.EnableOutlining = True
    End If

Next wSheet

ThisWorkbook.Protect Password:="JMP_DST_Lock"

Thank you very much for any help.

EDIT:
Turns out the comboboxes are the reason for the error. If the linked cells are locked, anytime the sheet calculates (any change when on automatic calculation) causes the warnings. Now, I have code that unprotects the sheets on each combobox GotFocus, but aside from that, these are cropping up.

Is there a middle ground? A way to keep the linked cells locked without these warnings popping up? A way to make sure the comboboxes are hitting the linked cells except on selection?

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T06:35:37+00:00Added an answer on June 12, 2026 at 6:35 am

    Your logic seems wrong. You’re unprotecting the sheet, then protecting visible sheets, and then protecting the entire workbook (in the last code line).

    Try something like this instead (untested):

    For Each wSheet In Worksheets
      If wSheet.Visible = True Then
        wSheet.Protect Password:="JMP_DST_Lock", UserInterFaceOnly:=True
        wSheet.EnableOutlining = True
      End If
    Next wSheet
    

    If the workbook is saved with the sheets in protected state, change it to something like this instead:

    For Each wSheet In Worksheets
      If wSheet.Visible = False Then
        wSheet.UnProtect Password:="JMP_DST_Lock"
      End If
    Next wSheet
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small problem that I am hoping to get some help with.
hoping to get some help here. I have locations on a database that I
I was hoping to get some help with my SQL Server script. Basically, I
I was hoping to get some advice on what to do. I have a
I have a problem that I'm hoping to get some direction in solving -
I am hoping to get some help on this issue. Some users on IE
I'm hoping to get some help with this weird problem. We're running the Jacorb
I struggle with JSON and jQuery so I'm hoping to get some help figuring
First off I'm horrible with regex, hoping I can get some help here cause
Hello all I was hoping to get some help with inported this class to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.