Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Detect copy and paste action

Hello excel users,

A copy and paste actions invokes a Worksheet_Change event which is fine.

Is it possible to detect that the user performs a copy and paste action?


For example the Worksheet_Change event can look something like this in
pseudocode:

**********
Private Sub Worksheet_Change(ByVal Target As Range)

If User entered data Then
Debug.Print "You entered data in a cell"
ElseIf user performs a copy and paste Then
Debug.Print "You did a copy and paste"
ElseIf User deleted the contents of a cell Then
Debug.Print "You deleted the contents"
End If

end sub
**********

Thanks in advance
Bret
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Detect copy and paste action

You cannot tell within Worksheet_Change whether the user pasted an entry in
versus typing it in, as far as I know. You're concerned about your formats
getting blown away?

--
Jim
"Bret Bernever" wrote in message
...
| Hello excel users,
|
| A copy and paste actions invokes a Worksheet_Change event which is fine.
|
| Is it possible to detect that the user performs a copy and paste action?
|
|
| For example the Worksheet_Change event can look something like this in
| pseudocode:
|
| **********
| Private Sub Worksheet_Change(ByVal Target As Range)
|
| If User entered data Then
| Debug.Print "You entered data in a cell"
| ElseIf user performs a copy and paste Then
| Debug.Print "You did a copy and paste"
| ElseIf User deleted the contents of a cell Then
| Debug.Print "You deleted the contents"
| End If
|
| end sub
| **********
|
| Thanks in advance
| Bret

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
Excell copy action pauses for 15 second for the smallest action Meekal Excel Discussion (Misc queries) 1 January 28th 10 04:30 PM
protecting ceels to copy -paste action grigoras victor Excel Worksheet Functions 1 June 19th 06 12:36 PM
protecting ceels to copy -paste action grigoras victor New Users to Excel 0 June 19th 06 07:15 AM
protecting ceels to copy -paste action grigoras victor Excel Discussion (Misc queries) 0 June 19th 06 07:14 AM
How do I capture user paste action and convert to Paste Special DonC Excel Programming 0 November 19th 04 01:43 PM


All times are GMT +1. The time now is 11:30 PM.

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

About Us

"It's about Microsoft Excel"