Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Combining Modules
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 *** |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VB Modules | Excel Discussion (Misc queries) | |||
Basic question - modules and class modules - what's the difference? | Excel Programming | |||
When to code in sheet or userform modules and when to use modules | Excel Programming | |||
Combining Modules | Excel Programming | |||
Class Modules vs Modules | Excel Programming |