PC Review


Reply
 
 
Nader Tewelde
Guest
Posts: n/a
 
      21st Jun 2007
Hello,

Is it possible to catch the event paste ?

I'd like to inform the user when is doing a copy & paste that some data
needs to be changed once the paste is done.

Thanks in advance.

Nader


 
Reply With Quote
 
 
 
 
Héctor Miguel
Guest
Posts: n/a
 
      22nd Jun 2007
hi, Nader !

> Is it possible to catch the event paste ?
> I'd like to inform the user when is doing a copy & paste
> that some data needs to be changed once the paste is done.


i think you could start with the following workaround and adapt to meet your conditions:

[ThisWorkbook code module]

Dim Possible_Paste As Boolean
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Possible_Paste = Application.CutCopyMode = xlCopy
End Sub
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Possible_Paste = Application.CutCopyMode = xlCopy
End Sub
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Possible_Paste Then
MsgBox "You have modified cell(s) that seems to come from a Paste-operation ..."
End If
End Sub

hth,
hector.


 
Reply With Quote
 
Nader Tewelde
Guest
Posts: n/a
 
      22nd Jun 2007
Thanks Hector.

"Héctor Miguel" <(E-Mail Removed)> a écrit dans le message de
news: (E-Mail Removed)...
> hi, Nader !
>
>> Is it possible to catch the event paste ?
>> I'd like to inform the user when is doing a copy & paste
>> that some data needs to be changed once the paste is done.

>
> i think you could start with the following workaround and adapt to meet
> your conditions:
>
> [ThisWorkbook code module]
>
> Dim Possible_Paste As Boolean
> Private Sub Workbook_SheetActivate(ByVal Sh As Object)
> Possible_Paste = Application.CutCopyMode = xlCopy
> End Sub
> Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target
> As Range)
> Possible_Paste = Application.CutCopyMode = xlCopy
> End Sub
> Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As
> Range)
> If Possible_Paste Then
> MsgBox "You have modified cell(s) that seems to come from a
> Paste-operation ..."
> End If
> End Sub
>
> hth,
> hector.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: catch PnP Event in C# Ben Voigt [C++ MVP] Microsoft C# .NET 1 26th Oct 2009 10:29 PM
Event Log Catch-22 Evan M. Microsoft Dot NET Framework Forms 1 1st Aug 2008 07:06 PM
How to catch the AdvancedSearchComplete event Pavel Rosoi Microsoft Outlook Form Programming 4 9th Jun 2008 08:58 PM
How to catch "new-row-editing-cancelled" event in DataGridView (isthere any similar event?) Paul Jones Microsoft Dot NET Framework Forms 2 25th Jul 2006 02:29 PM
catch the save event neoret@gmail.com Microsoft Outlook Interoperability 1 29th May 2006 01:10 PM


Features
 

Advertising
 

Newsgroups
 


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