ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How can I protect cell from user entry but able to alter/clear in (https://www.excelbanter.com/excel-programming/409918-how-can-i-protect-cell-user-entry-but-able-alter-clear.html)

Kermitp

How can I protect cell from user entry but able to alter/clear in
 
I am working a project where I want to limit the user changes via either a
form or a macro. In other words I do not want the user to be able to alter a
cell's content directly.

I know I could hide the worksheet or columns but the user has to be able to
view their content without directly altering them.

I tried locking the cells and password protecting the worksheet but then
when I attempt to clear the cell content via macro I get an error message.
Is there way to set the cell property for protection or no protection? I have
searched help without much success.

Error message:

Run-time error '1004':
The cell or chart that you are trying to change is protected and
therefore read-only.

To modify a protected cell or chart, first remove protection using the
Unprotect Sheet command (Review tab, Changes group). You may be
prompted for a password

--
Kermit, long time windows Office user

Office_Novice

How can I protect cell from user entry but able to alter/clear in
 
A modal form is likely your best option. A little more info would allow me to
help more.

"Kermitp" wrote:

I am working a project where I want to limit the user changes via either a
form or a macro. In other words I do not want the user to be able to alter a
cell's content directly.

I know I could hide the worksheet or columns but the user has to be able to
view their content without directly altering them.

I tried locking the cells and password protecting the worksheet but then
when I attempt to clear the cell content via macro I get an error message.
Is there way to set the cell property for protection or no protection? I have
searched help without much success.

Error message:

Run-time error '1004':
The cell or chart that you are trying to change is protected and
therefore read-only.

To modify a protected cell or chart, first remove protection using the
Unprotect Sheet command (Review tab, Changes group). You may be
prompted for a password

--
Kermit, long time windows Office user


Kermitp

How can I protect cell from user entry but able to alter/clear
 
I appreciate your response and I think I understand what you are saying but I
don't want to do that. If I go that far I would just create a VB app. which
is a long range plan.

Reason being is that today I supply the starting base excel spreadsheet to
which the users can add their own functions. However, there are some
thing(cells) that I do not allow them to alter.

After much searching I did find information on protecting and unprotecting
worksheets in VBA. So I can turn protecion on and off. However, that takes
away a lot ofthe functions a user can do on that worksheet.

I was hoping for some other method to control altering individual cells.

Thanks forthe response,
--
Kermit, long time windows Office user


"Office_Novice" wrote:

A modal form is likely your best option. A little more info would allow me to
help more.

"Kermitp" wrote:

I am working a project where I want to limit the user changes via either a
form or a macro. In other words I do not want the user to be able to alter a
cell's content directly.

I know I could hide the worksheet or columns but the user has to be able to
view their content without directly altering them.

I tried locking the cells and password protecting the worksheet but then
when I attempt to clear the cell content via macro I get an error message.
Is there way to set the cell property for protection or no protection? I have
searched help without much success.

Error message:

Run-time error '1004':
The cell or chart that you are trying to change is protected and
therefore read-only.

To modify a protected cell or chart, first remove protection using the
Unprotect Sheet command (Review tab, Changes group). You may be
prompted for a password

--
Kermit, long time windows Office user



All times are GMT +1. The time now is 10:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com