|
5秒間に表示点滅させているのですがそのコードが
いけないのでしょうか下記に書きます
Option Explicit
Private myFlag As Boolean
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Call Worksheet_SelectionChange2(Target)
Dim m As Long, n As Long
If Target.Address <> "$J$6:$P$6" Then
myFlag = True
Application.EnableCancelKey = xlInterrupt
Application.Cursor = xlDefault
Exit Sub
End If
Application.EnableCancelKey = xlDisabled
Application.Cursor = xlNorthwestArrow
myFlag = False
For m = 1 To 20000000
For n = 1 To 20000000: Next
If Target.Font.ColorIndex = -4105 Then
Target.Font.ColorIndex = 3
Else
Target.Font.ColorIndex = -4105
End If
DoEvents
If myFlag Then Exit Sub
Next
Application.EnableCancelKey = xlInterrupt
Application.Cursor = xlDefault
End Sub
以上です。
|
|