Prevent Paste into a cell

  • Thread starter Thread starter Fred
  • Start date Start date
F

Fred

I am trying to use the Worksheet's Change event but the event is not
triggered when the user pastes data directly into a cell.
Obviously I want the user to be able to modify the cell but I need the
change event so I can update other sheets whenever a change occurs.

Can I prevent a user from pasteing directly into a cell, or can I get the
change event to trigger when data is pasted direct to a cell.

Thanks
Fred
 
Pasting into a worksheet causes worksheet_change to fire for me.

What version of excel are you using?
 
Thanks Dave,
I am using excel '97 on windows XP and there is no way I can get the
worksheet's change event nor the workbook's sheetChange event to trigger
when pasting data into a cell.
I am pasting it into the cell without double clicking on the cell first.
Should the change event trigger when pasting?
If so does anyone know of any reasons why mine is not triggering?
When I type data into the cell the event does trigger so the event handler
is working.

Fred
 
Hi,

this is a way to prevent paste (in excel 2000)

unlock a cell. (e.g. A1) (Format > Cell > Protection > Locked)
lock the next cell. (e.g. B1)
merge the cells. (A1:B1)
hide the locked cell. (B:B)
protect the sheet.
 

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