Why can't I select any cell, even unlocked cells, after my program runs unless I unprotect it?

USAMax

Well-known Member
Joined
May 31, 2006
Messages
832
Office Version
  1. 365
Platform
  1. Windows
I am creating a form that the first person only needs a little access to but they need to see some fields but no rights to them.

The next person needs to see what they entered but should not be allowed to change it.

The last person needs full access.

To protect the cells I am only using three commands:
.EntireColumn.Hidden
.locked
.FormatConditions

I have not gotten to the point where I protect the worksheet but after running the program I cannot select any of the cells including the cells that are not locked but I can double click on them.

At the end of the code I added:
Code:
ActiveSheet.Unprotect

The really strange thing is that the unprotect worked but I had a different worksheet selected. I unprotected, "Sheet 1" and not, "Master Item Information".
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

USAMax

Well-known Member
Joined
May 31, 2006
Messages
832
Office Version
  1. 365
Platform
  1. Windows
I don't know why but it works after I enable or disable protection after I run my code.

The problem is fixed but I would still like to know why this happened.
 

Forum statistics

Threads
1,136,640
Messages
5,676,947
Members
419,660
Latest member
Fred Cailloux

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top