Adax,
VBA does not have a method to address non-string values of the clipboard.
But you can set up an event to capture the copy or cut - within a
workbook, but not between workbooks - and have that value available. Copy
this (somewhat tested, but not fully tested) code into the
ThisWorkbook codemodule:
Option Explicit
Dim myAdd1 As String
Dim myAdd2 As String
Dim CCAdd As String
Dim WasNotCopy As Boolean
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal
Target As Range)
If myAdd1 <> "" Then
myAdd2 = myAdd1
myAdd1 = Target.Address(True, True, xlA1, True)
Else
myAdd1 = Target.Address(True, True, xlA1, True)
myAdd2 = myAdd1
End If
If (Application.CutCopyMode = xlCopy Or _
Application.CutCopyMode = xlCut) And WasNotCopy Then
MsgBox "Clipboard has " & CCAdd
End If
If (Application.CutCopyMode = xlCopy Or _
Application.CutCopyMode = xlCut) And Not WasNotCopy Then
CCAdd = myAdd2
MsgBox "Clipboard has " & CCAdd
WasNotCopy = True
End If
If Application.CutCopyMode = False Then WasNotCopy = False
End Sub
HTH,
Bernie
MS Excel MVP