Friends,
I have a Worksheet_SelectionChange event that displays a command button next to the newly activated cell and then disappears after 3 seconds using...
On Error Resume Next
If Application.CutCopyMode = 1 Then
Exit Sub
ElseIf Target.Cells.Count > 1 Then
Exit Sub
ElseIf Not Application.Intersect(Target, Range("A6:A1048576")) Is Nothing Then
If Not Target.Value = "" Then
Set r = Target
CommandButton2.Left = Target.Offset(0, 1).Left
CommandButton2.Top = Target.Top
CommandButton2.Visible = True
Application.OnTime Now + TimeValue("00:00:03"), "ButtonVanish"
It works great as long as the user moves slowly. If they start clicking through cells rapidly then the commandbutton starts to wig out. It appears and disappears all over the place.
It seems like the 3 second time interval just keeps adding up and adding up... So for example if you could click on 15 cells in one second it seems like you have to wait about 3X15 = 45 seconds before it starts behaving normally again.
Is there a way to stop the time function the instant that another action has been performed?
Thanks,
-Mike
Bookmarks