Disable paste option in worksheet.

  • Thread starter Thread starter Heera
  • Start date Start date
H

Heera

Hi,

I have a column where I have applied validation for dates but when
someone uses the paste option then
the validation is of no use.

I want a macro which will not allow the user to paste anything in a
particular column. The user has to enter the date without using the
copy paste option.

Basically i want to disable the paste option in a particular range.

Regards
Heera
 
One way:

Unlock (Format/Cells/Protection) any cells that you want the user to be
able to type or paste into, then choose Tools/Protection/Protect
Worksheet.

A macro won't prevent a paste since no event will be fired until after
the paste is accomplished.

You *could* use an event macro (Worksheet_Change) to reapply validation
if it was removed by a paste, but you'll then have to deal with deciding
which value to insert (or use another event to store the value).
 

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