View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_3_] Dave Peterson[_3_] is offline
external usenet poster
 
Posts: 2,824
Default Coverting worksheet macro to regular macro

You have more replies at your original thread.

"wammer <" wrote:

I'm having toruble converting this to a regular macro - how would I do
this?

Private Sub Worksheet_Calculate()

Dim myColorIndex As Long
Dim myCell As Range
Dim myRng As Range

Set myRng = Me.Range("o5:Iv2232")

For Each myCell In myRng.Cells
Select Case LCase(myCell.Value)
Case Is = "b": myColorIndex = 3
Case Is = "v": myColorIndex = 5
Case Else: myColorIndex = xlNone
End Select
myCell.Interior.ColorIndex = myColorIndex
Next myCell

End Sub

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson