|
koshimizuさん、こんにちは。
標準モジュールに↓を入れて頂いて、保存終了後、再度開いて実行してみて下さい。
Option Explicit
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Dim I As Integer
Sub AUTO_OPEN()
Application.OnKey "{ENTER}", "点滅" 'ENTERを押したらマクロを実行
Application.OnKey "~", "点滅" 'テンキーのENTERを押したら
End Sub
Sub AUTO_CLOSE()
Application.OnKey "{ENTER}"
Application.OnKey "~"
End Sub
Sub 点滅()
Dim I As Integer
If (ActiveCell.Value <> "") And (ActiveCell.Address = "$C$5") Then
For I = 1 To 5
With Range("C10,C12").Font
.ColorIndex = 2
Sleep 300
.ColorIndex = 0
Sleep 300
End With
Next
End If
ActiveCell.Offset(1, 0).Select
End Sub
|
|