Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Alan,
The value of Application.CutCopyMode will tell you whether a user has a cut or copy operation in progress when your event procedure fires, something like this: Private Sub Worksheet_Change(ByVal Target As Range) If Application.CutCopyMode = 0 Then ''' User hasn't copied anything, ''' run your macro here. End If End Sub -- Rob Bovey, MCSE, MCSD, Excel MVP Application Professionals http://www.appspro.com/ * Please post all replies to this newsgroup * * I delete all unsolicited e-mail responses * "Alan" wrote in message ... Hi All, I have a macro running upon a Worksheet_Change and Worksheet_SelectionChange event from within a worksheet code (not a module). When a change is made to the worksheet, which is a filtered list, it calls a sub which checks which columns are filtered and changes the background colour to make it easier to see, or changes it back to no fill if the filter was removed. However, if a user tries to copy and paste from one cell to another, when they move the cell pointer up a cell (say), one of the events is triggered and by the time the macro has run, the contents of the cell that was copied has been lost and paste is ineffective. I am wondering if there is some way for me to check in the event procedure whether the user has tried to copy something, and if so, then not call the macro? Thanks in advance for any help you can render, Alan. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Disabling WORKSHEET_CHANGE event | Excel Discussion (Misc queries) | |||
Controling the Worksheet_Change Event? | Excel Discussion (Misc queries) | |||
Worksheet_Change event question | Excel Programming | |||
xl97 and Worksheet_Change event ? | Excel Programming | |||
Worksheet_Change Event Not Working | Excel Programming |