View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
wammer wammer is offline
external usenet poster
 
Posts: 1
Default Coverting worksheet macro to regular macro

I'm having toruble converting this to a regular macro - how would I d
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 Su

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