Thread: Copy and paste
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Sandy Mann Sandy Mann is offline
external usenet poster
 
Posts: 2,345
Default Copy and paste

How about a sheet event code?

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column 2 Then Exit Sub

Application.EnableEvents = False
If Target.Value2 < Int(Now) Then
Target.Value = ""
MsgBox "Please do not pre-date"
End If
Application.EnableEvents = True

End Sub

place it in the sheet module for the sheet you are using.
--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"Pietro" wrote in message
...
Hi all,
I have some columns(A,B) in my Excel sheet that don't allow to the users
to
insert a date prior to today's date,as i used data validation to achieve
this,but actually users write a date in other columns and paste them in
the
columns(A,B) in order to put a date that's prior to today's date,how can i
solve this problem?