Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
Can someone please tell me why I get a runtime error with the following code. And could someone please tell me how to resolve it? Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Me.Range("a1")) Is Nothing Then Exit Sub Dim n As Integer Dim NextTime As Date If Range("a1", "a2").Value 7 Then For n = 1 To 5 With Range("a1").Font If .ColorIndex = 2 Then .ColorIndex = 3 Else .ColorIndex = 2 End With With Range("a1").Interior If .ColorIndex = 3 Then .ColorIndex = 2 Else .ColorIndex = 3 End With Application.Wait Now + TimeValue("00:00:01") Next End If With Range("a1") ..Font.ColorIndex = 3 ..Interior.ColorIndex = 2 End With End Sub Cheers Carlton *** Sent via Developersdex http://www.developersdex.com *** |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
xpath error? Runtime Error 13 type mismatch | Excel Discussion (Misc queries) | |||
Runtime error '1004' General ODBC error | New Users to Excel | |||
Excel 2003 Macro Error - Runtime error 1004 | Excel Discussion (Misc queries) | |||
Syntax Error Runtime Error '424' Object Required | Excel Programming | |||
Unknown where is the problem on the Runtime error - Automation error | Excel Programming |