View Single Post
  #2   Report Post  
Harald Staff
 
Posts: n/a
Default

Hi

If .Column < 4 Then Exit Sub
( < meaning not equal to 4)

HTH. Best wishes Harald

"L Mieth" skrev i melding
...
I have a need for a reminder when particular data is enterd into a cell of

a
certain column.
In a previous posting I found exactly what I need except for one problem

and
I really know nothing of writing codes.

On 3 14-05 Jason Morin replied to a post from red_oceanus on this same
matter.

The code he presented pertains to the first column. I need the message to
work in the fourth column only. I tried to alter the "1" to "4" in his
code but then I recieve a pop up message in any of the first four columns
instead of only the fourth column. Everything else I tried doesn't work at
all.

How can I edit this code to suit my needs?

Jason's response as follows:

Assuming data entry cells are col. A, right-click the
worksheet tab, choose "View Code", copy in the code
below, and press ALT+Q to close VBE.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim sMsg As String
With Target
If .Column 1 Then Exit Sub
If .Count 1 Then Exit Sub
Application.ScreenUpdating = False
Select Case LCase(.Value)
Case "new instrument"
sMsg = "Call Propertry Accounting"
Case "new house"
sMsg = "Call Inspector"
Case "new car"
sMsg = "Buy Insurance"
Case "robbed"
sMsg = "Buy Gun"
'additional messages here
Case Else
sMsg = "Don't Recognize This"
End Select
MsgBox sMsg
Application.ScreenUpdating = True
End With
End Sub