LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VB Modules dhstein Excel Discussion (Misc queries) 9 November 8th 08 09:46 PM
Basic question - modules and class modules - what's the difference? Mark Stephens[_3_] Excel Programming 9 May 8th 05 11:48 AM
When to code in sheet or userform modules and when to use modules Tony James Excel Programming 1 December 16th 04 10:02 PM
Combining Modules Phillips Excel Programming 2 November 27th 03 12:42 PM
Class Modules vs Modules Jeff Marshall Excel Programming 2 September 28th 03 07:57 PM


All times are GMT +1. The time now is 06:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"