"Miss Kim" wrote in message
...
Rob,
Alan said the same code is the Worksheet_SelectionChange
event, so that will still cause the code to exacute once:
after the selection has changed, but before the Copy
command is initiated. I don't think it will be a problem
with Alan's code that only applies formating, but maybe a
better solution is to trap the filter change?
Hi Kim,
I just provided the Change event code as an example. The same kind of
check would have to be done in SelectionChange as well. Trapping the filter
change itself could be a good alternative, although it would require some
indirect programming. Because changing the autofilter criteria on a
worksheet doesn't fire any events, you'd have to do something like add a
volatile function to the worksheet, trap the Calculate event, and check for
a change in the filter criteria. This process itself would still need to be
prevented from inadvertently canceling a user's copy operation too, though.
--
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 *