View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
helmekki[_12_] helmekki[_12_] is offline
external usenet poster
 
Posts: 1
Default help with Msgbox

i did conditional formatting that if a cell value is <=2 change th
color to purpel,
then after that did writ a code that makes a Msgbox appears as
wornning followed by another
Msgbox that give the exact addrress of the cell that contain <=2.....

i tried to with this code, but it did not work........
any hints is appreciated.............


Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range
'Dim myCheck As Integer

For Each c In Sheet3.Range("E32:E1800").Cells
If c.Interior.ColorIndex < -4142 Then
If c.Value <= 2 Then
c.Interior.ColorIndex = 3
MsgBox """?C????I ??I ???C? C??I??? ???E ?E? ", vbOKOnly, " Warnning"
MsgBox c.Address
End If
End If
Next
End Sub

yours
hesha

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