LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 390
Default Adding code

Hello
I have this code (below) and I wish to add another Interior.ColorIndex 5 and
another Value "Media". Is this possible?

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("D7").Interior.ColorIndex = 4 Then
Range("D7").Interior.ColorIndex = 6
Range("D7").Value = "SPORT"

ElseIf Range("D7").Interior.ColorIndex = 6 Then
Range("D7").Interior.ColorIndex = 4
Range("D7").Value = "EDUCATION"

End If
End Sub

Thanks in advance
 
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
Creating excel file, adding code to it from code, VBE window stays BlueWolverine Excel Programming 0 November 5th 09 07:55 PM
adding code lines with vba code thread Excel Programming 4 February 6th 08 01:31 PM
Shorten code to apply to all sheets except a few, instead of individually naming them, and later adding to code. Corey Excel Programming 3 December 11th 06 05:14 AM
adding to a VBA COde diacci1st Excel Programming 0 November 23rd 06 11:21 AM
Adding space to VBA code John Excel Programming 1 June 28th 04 08:56 PM


All times are GMT +1. The time now is 11:15 AM.

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"