Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Will you please tell me what I have wrong with this code?
In Workbook: Private Sub Workbook_BeforeClose(Cancel As Boolean) stopFlashing End Sub Private Sub Workbook_Open() startFlashing End Sub In Module: 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("B1").Interior.ColorIndex = 36 Then Sheet1.Range("B1").Interior.ColorIndex = 41 Sheet1.Range("B1").Value = "Light Blue" Sheet2.Range("B1").Interior.ColorIndex = 41 Sheet2.Range("B1").Value = "Light Blue" Sheet3.Range("B1").Interior.ColorIndex = 41 Sheet3.Range("B1").Value = "Light Blue" ElseIf Range("B1").Interior.ColorIndex = 41 Then Sheet1.Range("B1").Interior.ColorIndex = 36 Sheet1.Range("B1").Value = "Light Yellow" Sheet2.Range("B1").Interior.ColorIndex = 36 Sheet2.Range("B1").Value = "Light Yellow" Sheet3.Range("B1").Interior.ColorIndex = 36 Sheet3.Range("B1").Value = "Light Yellow" End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Run VBA code only worksheet change, but don't trigger worksheet_change event based on what the code does | Excel Programming | |||
Shorten code to apply to all sheets except a few, instead of individually naming them, and later adding to code. | Excel Programming | |||
Protect Sheet with code, but then code will not Paste error. How do i get around this. Please read for explainations.... | Excel Programming | |||
Excel code convert to Access code - Concat & eliminate duplicates | Excel Programming |