hi Cal,
Good to see you back [for a while].
As usual, the tricky ones fall to you - are you happy with 100 or was there more work than this?
You name your price and I will oblige.
Dave
Main Topics
Browse All TopicsHi All,
Small problem - for Trivia Night XL tool - on the big screen - need some glitz [not my forte!].
Have 15 teams and they present nicely in a 'View' sheet for overhead projection. Round 1 through to Round 10 - total on right hand side [Col W]. Two sheets 1: Data - for entering results and playing wild cards to increment scores by pre-set factor, and 2: View with the nice clean overhead results page.
In 'View', need the cells of the row of the current winner to flash light green, runner up flashes light blue, and third to flash yellow.
Each of these rows must flash conditionally dependent on ranking in field of teams.
Something like macro that runs on either counter, timer, or stepped loop. Whenever the View sheet has focus, run macro - enable breaking out of the macro [as it will run in full screen, maybe a button with Ctrl-? to break out of the loop] to return to the Data Sheet.
Ask me some more questions if there is insufficient to get an idea of what I am doing, or grab a copy of the work in progress from www.liveit.com.au/filetfr [best to Save Copy As].
In all fairness, I think it best to post the code for the solution in EE - so don't bother to try to send the file back to me.
Also, I would think there might be a few have a go, so would be happy to up the points and split if needed.
Have fun - back in about 8 hours.
Dave
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Cal,
Just one little problem.
If attempting to close the workbook with the 'flashing' View sheet open, XL sees the change made by the flash, saves, and re-opens. The workaround is to close from any other worksheet, but ... can you make so it closes from View sheet?
A new copy of the work in progress is at www.liveit.com.au/filetfr
Dave
Well,
The first problem was to call an OnTime at the exact same moment (as explained in this article), which is why I used a workaround, which made the workbook be re-opened when it was closed, while a OnTime event was still scheduled. The correction is included in the code. But you will need to add the line Sheet1.Activate to the before_close event of your workbook:
Private Sub Workbook_BeforeClose(Cance
Sheet1.Activate
End Sub
The second problem, is because in case of empy scores, all teams are in first place, and the search for 2nd and 3rd place is causing errors. The same of course, as you noticed yourself, applies to 15 equal scores. This is now dealed with by error handlers.
Code follows (the result sheet part)
calacuccia
'Code
Dim nextTime As Double
Private Sub Worksheet_Activate()
goFlashing
End Sub
Private Sub Worksheet_Deactivate()
On Error Resume Next
'Error loop necessary, because it is unknown which of both procedures is
'scheduled at this point, so the error caused by 1 of 2 statements below is
'expected and normal
Application.OnTime nextTime, "The_Game.xls!Sheet2.BackW
Application.OnTime nextTime, "The_Game.xls!Sheet2.goFla
On Error GoTo 0
stopFlashing
End Sub
Sub goFlashing()
Dim totals As Range, c As Range
Dim actTotal As Double
Dim firstRow As Integer, i As Integer
Dim aRank As Integer, nEquals As Integer
Dim zFirst(), zSecond(), zThird() As Integer
Dim Range1 As Range, Range2 As Range, Range3 As Range
Set totals = Me.Range("W3:W17") 'You know this can be changer, fixed for the moment
'Look for first place teams (put them in matrix zFirst)
aRank = 1
'Error loop to deal with all empty data ""
On Error Resume Next
actTotal = Application.WorksheetFunct
If Err.Number = 1004 Then Exit Sub
Err.Clear
On Error GoTo 0
Set c = totals.Find(What:=actTotal
firstRow = c.Row
ReDim Preserve zFirst(0)
zFirst(0) = 0
Do
ReDim Preserve zFirst(UBound(zFirst) + 1)
zFirst(UBound(zFirst)) = c.Row
Set c = totals.FindNext(c)
Loop While Not c Is Nothing And c.Row <> firstRow
Set Range1 = Me.Range("B" & zFirst(1) & ":W" & zFirst(1))
For i = 2 To UBound(zFirst)
Set Range1 = Union(Range1, Me.Range("B" & zFirst(i) & ":W" & zFirst(i)))
Next i
'Look for second place teams (put them in matrix zSecond)
aRank = aRank + UBound(zFirst)
'Error handler used to detect cases with only no. 1 position teams
On Error Resume Next
actTotal = Application.WorksheetFunct
If Err.Number = 1004 Then
Err.Clear
On Error GoTo 0
GoTo flashPart
End If
On Error GoTo 0
Set c = totals.Find(What:=actTotal
firstRow = c.Row
ReDim Preserve zSecond(0)
zSecond(0) = 0
Do
ReDim Preserve zSecond(UBound(zSecond) + 1)
zSecond(UBound(zSecond)) = c.Row
Set c = totals.FindNext(c)
Loop While Not c Is Nothing And c.Row <> firstRow
Set Range2 = Me.Range("B" & zSecond(1) & ":W" & zSecond(1))
For i = 2 To UBound(zSecond)
Set Range2 = Union(Range2, Me.Range("B" & zSecond(i) & ":W" & zSecond(i)))
Next i
'Look for third place teams (put them in matrix zThird)
aRank = aRank + UBound(zSecond)
'Error handler used to detect cases with only no. 1 position teams
On Error Resume Next
actTotal = Application.WorksheetFunct
If Err.Number = 1004 Then
Err.Clear
On Error GoTo 0
GoTo flashPart
End If
On Error GoTo 0
Set c = totals.Find(What:=actTotal
firstRow = c.Row
ReDim Preserve zThird(0)
zThird(0) = 0
Do
ReDim Preserve zThird(UBound(zThird) + 1)
zThird(UBound(zThird)) = c.Row
Set c = totals.FindNext(c)
Loop While Not c Is Nothing And c.Row <> firstRow
Set Range3 = Me.Range("B" & zThird(1) & ":W" & zThird(1))
For i = 2 To UBound(zThird)
Set Range3 = Union(Range3, Me.Range("B" & zThird(i) & ":W" & zThird(i)))
Next i
'Now make rows stored in zFirst flash
flashPart:
Range1.Interior.ColorIndex
'Same to rows from zSecond
On Error Resume Next
'This part is also handled, to prevent the case of all no. 1 position teams
Range2.Interior.ColorIndex
'and for rows in zThird
Range3.Interior.ColorIndex
Err.Clear
On Error GoTo 0
nextTime = Now() + TimeValue("00:00:01")
Application.OnTime nextTime, "The_Game.xls!Sheet2.BackW
End Sub
Sub stopFlashing()
Me.Range("B3:W17").Interio
End Sub
Sub BackWhite()
stopFlashing
nextTime = Now() + TimeValue("00:00:01")
Application.OnTime nextTime, "The_Game.xls!Sheet2.goFla
End Sub
The article was http://support.microsoft.c
Business Accounts
Answer for Membership
by: calacucciaPosted on 2002-03-16 at 10:00:34ID: 6871546
Dave,
ion.Large( totals, aRank) , LookIn:=xlValues, Lookat:=xlWhole) ion.Large( totals, aRank) , LookIn:=xlValues, Lookat:=xlWhole) ion.Large( totals, aRank) , LookIn:=xlValues, Lookat:=xlWhole) = 34 = 35 = 36 hite"
r.ColorInd ex = -4142
shing"
I will assume that the range containing the totals are always on the same location, in your sample W3:W17
Try the following code in the worksheet module of the View sheet, and look if you're happy with this.
Kind Regards
calacuccia
'****** Code *********
Dim stopFlag As Boolean
Private Sub Worksheet_Activate()
stopFlag = False
goFlashing
End Sub
Private Sub Worksheet_Deactivate()
stopFlag = True
stopFlashing
End Sub
Sub goFlashing()
Dim totals As Range, c As Range
Dim actTotal As Double
Dim firstRow As Integer, i As Integer
Dim aRank As Integer, nEquals As Integer
Dim zFirst(), zSecond(), zThird() As Integer
Dim Range1 As Range, Range2 As Range, Range3 As Range
Set totals = Me.Range("W3:W17") 'You know this can be changer, fixed for the moment
'Look for first place teams (put them in matrix zFirst)
aRank = 1
actTotal = Application.WorksheetFunct
Set c = totals.Find(What:=actTotal
firstRow = c.Row
ReDim Preserve zFirst(0)
zFirst(0) = 0
Do
ReDim Preserve zFirst(UBound(zFirst) + 1)
zFirst(UBound(zFirst)) = c.Row
Set c = totals.FindNext(c)
Loop While Not c Is Nothing And c.Row <> firstRow
Set Range1 = Me.Range("B" & zFirst(1) & ":W" & zFirst(1))
For i = 2 To UBound(zFirst)
Set Range1 = Union(Range1, Me.Range("B" & zFirst(i) & ":W" & zFirst(i)))
Next i
'Look for second place teams (put them in matrix zSecond)
aRank = aRank + UBound(zFirst)
actTotal = Application.WorksheetFunct
Set c = totals.Find(What:=actTotal
firstRow = c.Row
ReDim Preserve zSecond(0)
zSecond(0) = 0
Do
ReDim Preserve zSecond(UBound(zSecond) + 1)
zSecond(UBound(zSecond)) = c.Row
Set c = totals.FindNext(c)
Loop While Not c Is Nothing And c.Row <> firstRow
Set Range2 = Me.Range("B" & zSecond(1) & ":W" & zSecond(1))
For i = 2 To UBound(zSecond)
Set Range2 = Union(Range2, Me.Range("B" & zSecond(i) & ":W" & zSecond(i)))
Next i
'Look for second place teams (put them in matrix zSecond)
aRank = aRank + UBound(zSecond)
actTotal = Application.WorksheetFunct
Set c = totals.Find(What:=actTotal
firstRow = c.Row
ReDim Preserve zThird(0)
zThird(0) = 0
Do
ReDim Preserve zThird(UBound(zThird) + 1)
zThird(UBound(zThird)) = c.Row
Set c = totals.FindNext(c)
Loop While Not c Is Nothing And c.Row <> firstRow
Set Range3 = Me.Range("B" & zThird(1) & ":W" & zThird(1))
For i = 2 To UBound(zThird)
Set Range3 = Union(Range3, Me.Range("B" & zThird(i) & ":W" & zThird(i)))
Next i
'Now make rows stored in zFirst flash
Range1.Interior.ColorIndex
'Same to rows from zSecond
Range2.Interior.ColorIndex
'and for rows in zThird
Range3.Interior.ColorIndex
If stopFlag = False Then
Application.OnTime Now() + TimeValue("00:00:02"), "The_Game.xls!Sheet2.BackW
End If
End Sub
Sub stopFlashing()
Me.Range("B3:W17").Interio
End Sub
Sub BackWhite()
stopFlashing
If stopFlag = False Then
Application.OnTime Now() + TimeValue("00:00:02"), "The_Game.xls!Sheet2.goFla
End If
End Sub