开发者

How to make hidden rows not editable/copiable in VBA?

开发者 https://www.devze.com 2023-04-12 14:36 出处:网络
The macro hides rows. After the rows are hidden, users can copy, edit and delete blocks of cells/rows. When users select the range that contains hidden cells, hidden cells, unfortunately, got selected

The macro hides rows. After the rows are hidden, users can copy, edit and delete blocks of cells/rows. When users select the range that contains hidden cells, hidden cells, unfortunately, got selected also, so all actions are performed on hidden cells too.

Is it possible to hide row开发者_开发技巧s in a such way, so they do not participate in actions performed on visible part of worksheet (behave as hidden rows after autofilter)?

To hide rows I use this code:

 Rows(i).EntireRow.Hidden = True


Not that I am aware of. You will probably need to look at protecting the worksheet and locking cells that you don't want modified/copied.

0

精彩评论

暂无评论...
验证码 换一张
取 消