ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Prevent insert/delete rows - sheet code (https://www.excelbanter.com/excel-programming/430709-prevent-insert-delete-rows-sheet-code.html)

Hennie Neuhoff

Prevent insert/delete rows - sheet code
 

Hi Guys
Excel 2003
I want to prevent the user from inserting/delete rows on certain sheets
in the workbook. On this site I got an idea to display a message
[Worksheet_Activate] which works fine, but that's not really what
I want. The problem is these messages appears when I run other code
like "Sort sheets by name" etc..
I guess the " Worksheet_Activate" should be replaced by something like
Worksheet_change.

I don't know how to do this.

As always, any assistance will be appreciated.

--
HJN

OssieMac

Prevent insert/delete rows - sheet code
 

Select menu item Tools - Protection - Protect Sheet.

Check the boxes against those things you want the user to be able to do and
leave the others unchecked.

Enter a password. (You will be prompted to enter it again.)

WARNING: Don't forget the password.

--
Regards,

OssieMac


"Hennie Neuhoff" wrote:

Hi Guys
Excel 2003
I want to prevent the user from inserting/delete rows on certain sheets
in the workbook. On this site I got an idea to display a message
[Worksheet_Activate] which works fine, but that's not really what
I want. The problem is these messages appears when I run other code
like "Sort sheets by name" etc..
I guess the " Worksheet_Activate" should be replaced by something like
Worksheet_change.

I don't know how to do this.

As always, any assistance will be appreciated.

--
HJN


OssieMac

Prevent insert/delete rows - sheet code
 

Forgot to say that before implementing my previous suggestion you may want to
select all cells that you want the user to be able to edit then select menu
item Format - Cells - Protection tab and uncheck Locked.

--
Regards,

OssieMac




All times are GMT +1. The time now is 10:33 AM.

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