Disable inserting or deleting row in selection of rows

  • Thread starter Thread starter Filips Benoit
  • Start date Start date
F

Filips Benoit

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
 
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.
 
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.
 
So, protection that disables insert-row and delete-row but allows editing is
NOT possible !

Filip
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top