Try the following. You'll need to set a reference (in VBA, Tools menu,
References item) to the "Microsoft Forms 2.0 Object Library" in order
to use the DataObject.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim DataObj As New MSForms.DataObject
Dim V As Variant
If Application.CutCopyMode = xlCut Then
DataObj.GetFromClipboard
V = DataObj.GetText
If IsNumeric(V) = True Then
If V < 10 Then
Application.CutCopyMode = False
End If
End If
End If
End Sub
Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
On Sat, 13 Dec 2008 12:23:00 -0800, GCRDelphi
wrote:
I wasnt to know how to get the value when SelectionChange fires and
CutCopyMode is Cut of the cell that is going to be cut and the cell it self.
For example:
(the following is not code)
Selects C5 = 10
Cut
Selects D10
[Selection Change Fires]
If CutCopyMode = xlCut Then
If "Copied Cell Value" < 10 Then CutCopyMode = False
.
.
.
How can I get "Copied Cel Value"?
Thank you for your help.