View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Reference a specific cell in the active row

Try it this way...

If Target.Value < Cells(Target.Row, "B").Value Then

--
Rick (MVP - Excel)


"dweber1188" wrote in message
...
I am trying to write a code that will generate a comment box if the user
enters a value not equal to the value I set. All my values are entered in
column B. How do I need to word the code so that if the active cell is
anywhere on row 4, the cell value is compared to B4, If the active cell is
M27 then its value is compared to B27, etc.

This is the portion of the code I am talking about.

If Target < WHAT DO I PUT HERE??? Then
With Target
.AddComment
.Comment.Text Text:=Application.UserName & ":" & Chr(10)
.Comment.Visible = True
End With
End If