ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   protect cells (https://www.excelbanter.com/excel-programming/338501-protect-cells.html)

Souris

protect cells
 
I would like to protect some cells to avoid user to modify information.

My copy method fails, if I use protect and unprotect.

I use Protection.AllowEditRanges.Add to write information on the cells using
VBA.

It seems VBA can not copy data in to the cellls which protect and unprotect
or AllowEdirRanges.

Am I right?
If I am wrong please advise me,
Any information is great appreciated,


Nigel

protect cells
 
You are right, you must unprotect before you copy, you can then re-protect
after.

--
Cheers
Nigel



"Souris" wrote in message
...
I would like to protect some cells to avoid user to modify information.

My copy method fails, if I use protect and unprotect.

I use Protection.AllowEditRanges.Add to write information on the cells

using
VBA.

It seems VBA can not copy data in to the cellls which protect and

unprotect
or AllowEdirRanges.

Am I right?
If I am wrong please advise me,
Any information is great appreciated,




Souris

protect cells
 
It seems that AllowEditRanges does not allow copy either.

I need delete AllowEditRange and unprotect spreadsheet to do copy method.



"Nigel" wrote:

You are right, you must unprotect before you copy, you can then re-protect
after.

--
Cheers
Nigel



"Souris" wrote in message
...
I would like to protect some cells to avoid user to modify information.

My copy method fails, if I use protect and unprotect.

I use Protection.AllowEditRanges.Add to write information on the cells

using
VBA.

It seems VBA can not copy data in to the cellls which protect and

unprotect
or AllowEdirRanges.

Am I right?
If I am wrong please advise me,
Any information is great appreciated,






All times are GMT +1. The time now is 11:05 AM.

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