Code arrangement

M

MAX

Hello
I want to arrage the code (below).
Instead I write the "TEAM'S Name" by myself, I want to create a formula or
something else in this code so that when A1>A5 it appears the team's name in
cell A2 and when A1<A5 it appears the team's name in cell A4. Is this
possible?

This is the code:

Option Explicit
Dim nextSecond

Sub startFlashing()
flashCell
End Sub

Sub stopFlashing()
On Error Resume Next
Application.OnTime nextSecond, "flashCell", , False
End Sub

Sub flashCell()
nextSecond = Now + TimeValue("00:00:01")
Application.OnTime nextSecond, "flashCell"


If Range("J65").Interior.ColorIndex = 3 Then
Range("J65").Interior.ColorIndex = 5
Range("J65").Value = "TEAM's Name"
ElseIf Range("J65").Interior.ColorIndex = 5 Then
Range("J65").Interior.ColorIndex = 3
Range("J65").Value = "CHAMPIONS 2009-2010"
End If
End Sub

Thanks in advance.
 
M

MAX

Hi Jacob
This is giving me this:
Compile error
Expected: end of statement.

Sorry for any inconvenience

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Adding code 5
Adding code 2
Arrange code 3
Compile error 7
2 codes in one sheet 5
Two codes in one set. 1
Code help 6
Code error 5

Top