2

I've adopted the Win API Clipboard work-around to the bug in the VB clipboard but after doing so realize that it's not really covering what I need.

What I really need is a way to detect if the user manually initiated a range copy [CTRL+C] prior to starting the macro procedure. Excel gives us the marching ants around the copied cell which is also the Active cell but so far I'm unable to discern any distinction in the cells Border properties indicating marching ants or otherwise.

A test of the WIN API clipboard might be helpful as a secondary workaround but detecting an active Excel copy-in-progress is preferred.

pnuts
  • 58,317
  • 11
  • 87
  • 139
IronX
  • 345
  • 3
  • 9

2 Answers2

2

Try this:

MsgBox Application.CutCopyMode = xlCopy
Excel Hero
  • 14,253
  • 4
  • 33
  • 40
-1

Thx Excel Hero, work's great.

Also tried the Application.CommandBars("Standard").Controls("&Undo").List(1) proposed solution in "Excel VBA How to detect if something was pasted in a Worksheet" but my Excel 2007 did not contain the List property. Given your simpler solution, I did not pursue troubleshooting the List issue.

Yes, but the Undo would likewise reveal a "Copy" string provided the List property were actually present.

Community
  • 1
  • 1
IronX
  • 345
  • 3
  • 9