Prevent value being deleted

J

johnsail

Hi
I have a spreadsheet where I am trying to control where the user is able to
go and what he is able to do.
I am nearly there but would like to achieve two last things.
1 When code is being processed the cursor moves about in synch with the
code. Is there a way of stopping this?
2 I am happy for the user to delete lines as long as they are deleted one
line at a time - starting with the last line entered.
I do not want user to be able to delete a line or any part of a line if
there is data on the next line.
I have been trying to insert code eg if target.offset(1, 0).value <> "" then
etc etc but have been unable to work out where to put the code to prevent
user from deleting the value already in the target cell.
And I haven't discovered a VB command to 'undelete'.

Would appreciate some help here.

John
 
L

Luke M

I don't know the answer to 2nd half of your quesiton, but for first part, you
can use:

Application.ScreenUpdating = False
'and it's counterpart
Application.ScreenUpdating = True
 

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

Top