MEMBUAT TULISAN BERKEDIP WARNA
WARNI
BUAT SEBUAT TULISAN DI C2
PASTEKAN KODE BERIKUT PADA SEBUAH MODUL
Sub berkedip()
Dim RunWhen As Double
With
ThisWorkbook.Worksheets("Sheet1").Range("c2").Font
If .ColorIndex = 5 Then
.ColorIndex = 2
Else
If .ColorIndex = 2 Then
.ColorIndex = 3
Else
.ColorIndex = 5
End If
End If
End With
If
Worksheets("Sheet1").Range("a1").Value = 1 Then
RunWhen = Now + TimeSerial(0, 0,
1)
Application.OnTime RunWhen,
"'" & ThisWorkbook.Name & "'!Berkedip", , True
Else
On Error Resume Next
ThisWorkbook.Worksheets("Sheet1").Range("c2").Font.ColorIndex
= xlColorIndexAutomatic
Application.OnTime RunWhen,
"'" & ThisWorkbook.Name & "'!Berkedip", , False
End If
Worksheets("Sheet1").Range("a1").Value
= 1
End Sub
Sub Berhenti()
Worksheets("Sheet1").Range("a1").Value
= 2
End Sub
Demikian semoga bermanfaat !!
No comments:
Post a Comment