Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Data Validation - repost

Hi All,

I created a worksheet which has a validation that prevent duplicate entries.
The validation is working fine if the user types the value. My question is
how can I make excel to validate the values that the user copy from another
worksheet and paste to my worksheet.

Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 747
Default Data Validation - repost

Try this one (source : mrexcel)

Private Sub Workbook_WindowActivate(ByVal Wn As Window)
With Application
..CutCopyMode = False
..OnKey "^c", ""
End With
End Sub

Private Sub Workbook_Activate()
With Application
..CutCopyMode = False
..OnKey "^c", ""
End With
End Sub

Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal
Target As Range, Cancel As Boolean)
Cancel = True
MsgBox "Right click menu deactivated." & vbCrLf & _
"Cannot cut, copy, paste, or ''drag & drop''.", 16, "For this file:"
End Sub

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal
Target As Range)
Application.CutCopyMode = False
End Sub

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
With Application
..OnKey "^c", ""
..CutCopyMode = False
End With
End Sub

Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
Application.CutCopyMode = False
End Sub


On Sep 8, 10:26*pm, RaulDR wrote:
Hi All,

I created a worksheet which has a validation that prevent duplicate entries.
The validation is working fine if the user types the value. My question is
how can I make excel to validate the values that the user copy from another
worksheet and paste to my worksheet.

Thanks!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Data Validation - repost

Thanks Muddan!

"muddan madhu" wrote:

Try this one (source : mrexcel)

Private Sub Workbook_WindowActivate(ByVal Wn As Window)
With Application
..CutCopyMode = False
..OnKey "^c", ""
End With
End Sub

Private Sub Workbook_Activate()
With Application
..CutCopyMode = False
..OnKey "^c", ""
End With
End Sub

Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal
Target As Range, Cancel As Boolean)
Cancel = True
MsgBox "Right click menu deactivated." & vbCrLf & _
"Cannot cut, copy, paste, or ''drag & drop''.", 16, "For this file:"
End Sub

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal
Target As Range)
Application.CutCopyMode = False
End Sub

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
With Application
..OnKey "^c", ""
..CutCopyMode = False
End With
End Sub

Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
Application.CutCopyMode = False
End Sub


On Sep 8, 10:26 pm, RaulDR wrote:
Hi All,

I created a worksheet which has a validation that prevent duplicate entries.
The validation is working fine if the user types the value. My question is
how can I make excel to validate the values that the user copy from another
worksheet and paste to my worksheet.

Thanks!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Repost: Update querytable connections and refresh data Dale Fye Excel Discussion (Misc queries) 2 January 7th 08 05:34 PM
REPOST: Count certain records in filtered data Steve Simons Excel Discussion (Misc queries) 5 August 19th 06 12:48 PM
Conditional Formatting (Dates) Repost with additional data BigH Excel Discussion (Misc queries) 1 January 29th 06 10:18 PM
Pull Current Month's Data Out of List - Repost Karl Burrows Excel Discussion (Misc queries) 4 May 3rd 05 01:06 AM
REPOST: How can I make the graph omit blank cells in the data set? easy Charts and Charting in Excel 2 March 17th 05 09:57 AM


All times are GMT +1. The time now is 07:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"