OK, a vague enough question I am sure, but this is my predicament :
If I run my VBA program I get an error message "Argument Not Optional" ... but if I debug I get the message "Can't execute code in break mode" !!
My main VBA is in Thisworkbook and the new code is as follows :
The Module Blinking_Text contains the following code (this is adapted from code I have found online, I am not sure what this RunWhen stuff does) :
Any ideas ?
If I run my VBA program I get an error message "Argument Not Optional" ... but if I debug I get the message "Can't execute code in break mode" !!
My main VBA is in Thisworkbook and the new code is as follows :
Code:
Range("B11").Activate
Set myRange1 = Range("B" & (10 + mySession))
Set myRange2 = Range("H" & (10 + mySession))
If myRange1 = "" Then
Call StartBlink(myRange2)
End If
Application.ScreenUpdating = True
The Module Blinking_Text contains the following code (this is adapted from code I have found online, I am not sure what this RunWhen stuff does) :
Code:
Option Explicit
Public RunWhen As Double
Sub StartBlink(BlinkCell As Range)
If BlinkCell.Font.ColorIndex = 1 Then
BlinkCell.Font.ColorIndex = 2
Else
BlinkCell.Font.ColorIndex = 1
End If
RunWhen = Now + TimeSerial(0, 0, 1)
Application.OnTime RunWhen, "StartBlink", , True
End Sub
Sub StopBlink(BlinkCell As Range)
BlinkCell.Font.ColorIndex = xlAutomatic
Application.OnTime RunWhen, "StartBlink", , False
End Sub
Any ideas ?