ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Disable inserting or deleting row in selection of rows (https://www.excelbanter.com/excel-programming/400690-disable-inserting-deleting-row-selection-rows.html)

Filips Benoit[_2_]

Disable inserting or deleting row in selection of rows
 
Dear All,

Is it possible to ensure that the use cannot insert or delete rows in the
first printed page ( rows 1 till 38 in my case).
Since there is a button that insert data from a SQL-database in the first
page this page shoud not be altered in number of rows but the user shoud
still be able to change cell-data!

Thanks,

Filip



Michael

Disable inserting or deleting row in selection of rows
 
You can protect the sheet after the Database has been updated using the
following statement:


ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

This will allow selecting cells, but not inserting rows.


--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Filips Benoit" wrote:

Dear All,

Is it possible to ensure that the use cannot insert or delete rows in the
first printed page ( rows 1 till 38 in my case).
Since there is a button that insert data from a SQL-database in the first
page this page shoud not be altered in number of rows but the user shoud
still be able to change cell-data!

Thanks,

Filip




Michael

Disable inserting or deleting row in selection of rows
 
To make sure you can change data on any cell place the following instruction
before the one I posted on my previous reply, something like this:

Cells.Locked = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowInsertingRows:=True
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Michael" wrote:

You can protect the sheet after the Database has been updated using the
following statement:


ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

This will allow selecting cells, but not inserting rows.


--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Filips Benoit" wrote:

Dear All,

Is it possible to ensure that the use cannot insert or delete rows in the
first printed page ( rows 1 till 38 in my case).
Since there is a button that insert data from a SQL-database in the first
page this page shoud not be altered in number of rows but the user shoud
still be able to change cell-data!

Thanks,

Filip




Filips Benoit[_2_]

Disable inserting or deleting row in selection of rows
 
So, protection that disables insert-row and delete-row but allows editing is
NOT possible !

Filip

"Michael" wrote in message
...
You can protect the sheet after the Database has been updated using the
following statement:


ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

This will allow selecting cells, but not inserting rows.


--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Filips Benoit" wrote:

Dear All,

Is it possible to ensure that the use cannot insert or delete rows in the
first printed page ( rows 1 till 38 in my case).
Since there is a button that insert data from a SQL-database in the first
page this page shoud not be altered in number of rows but the user shoud
still be able to change cell-data!

Thanks,

Filip






Michael

Disable inserting or deleting row in selection of rows
 
Yes, in excel 2003 you should be able to protect the worksheet, with the
following settings:

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowInsertingRows:=False, AllowDeletingRows:=False

The next statement, allows you to change the cell values(What you refer as
editing):

Cells.Locked = False



--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Filips Benoit" wrote:

So, protection that disables insert-row and delete-row but allows editing is
NOT possible !

Filip

"Michael" wrote in message
...
You can protect the sheet after the Database has been updated using the
following statement:


ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

This will allow selecting cells, but not inserting rows.


--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Filips Benoit" wrote:

Dear All,

Is it possible to ensure that the use cannot insert or delete rows in the
first printed page ( rows 1 till 38 in my case).
Since there is a button that insert data from a SQL-database in the first
page this page shoud not be altered in number of rows but the user shoud
still be able to change cell-data!

Thanks,

Filip








All times are GMT +1. The time now is 08:45 AM.

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