View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Combining Modules


Sub Flash()
cTimes = cTimes + 1
If cTimes = 10 Then
With ActiveWorkbook.Styles("Flash")
.Font.ColorIndex = xlColorIndexAutomatic
End With
Else
nStart = Now + TimeValue("00:00:01")
With ActiveWorkbook.Styles("Flash")
If .Font.ColorIndex = 3 Then
.Font.ColorIndex = xlColorIndexAutomatic
.Interior.ColorIndex = xlColorIndexNone
Else
.Font.ColorIndex = 3
.Interior.ColorIndex = 19
.Interior.Pattern = xlSolid
End If
End With
Application.OnTime nStart, "Flash"
Application.OnTime nStart, "Flash2"
End If
End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Carlton Patterson" wrote in message
...
Hello all,

Can someone show me how combine the following modules into one module.

MODULE ONE

Sub Flash()
cTimes = cTimes + 1
If cTimes = 10 Then
With ActiveWorkbook.Styles("Flash")
.Font.ColorIndex = xlColorIndexAutomatic
End With
Else
nStart = Now + TimeValue("00:00:01")
With ActiveWorkbook.Styles("Flash")
If .Font.ColorIndex = 3 Then
.Font.ColorIndex = xlColorIndexAutomatic
.Interior.ColorIndex = xlColorIndexNone
Else
.Font.ColorIndex = 3
.Interior.ColorIndex = 19
.Interior.Pattern = xlSolid
End If
End With
Application.OnTime nStart, "Flash"
End If
End Sub


MODULE TWO

Sub Flash2()
cTimes = cTimes + 1
If cTimes = 10 Then
With ActiveWorkbook.Styles("Flash")
.Font.ColorIndex = xlColorIndexAutomatic
End With
Else
nStart = Now + TimeValue("00:00:01")
With ActiveWorkbook.Styles("Flash")
If .Font.ColorIndex = 3 Then
.Font.ColorIndex = xlColorIndexAutomatic
.Interior.ColorIndex = xlColorIndexNone
Else
.Font.ColorIndex = 3
.Interior.ColorIndex = 19
.Interior.Pattern = xlSolid
End If
End With
Application.OnTime nStart, "Flash2"
End If
End Sub


Cheers

Carlton



*** Sent via Developersdex http://www.developersdex.com ***