View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
L. Howard Kittle
 
Posts: n/a
Default I am trying to add notes to a drop down list

Hi Gary,

Paste this in your worksheet code module. Also I entered =TODAY() in cell
E1 and assumed F1 as having the drop down. Change to suit and adjust the
code to comply.

Gives you a list of "lates" or "earlys" in column A and a visible comment
with date and excuse.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Application.EnableEvents = False
If Target < Range("F1") Then Exit Sub
Range("A100").End(xlUp).Offset(1, 0).Select

With Selection
.AddComment
.Comment.Text Text:=Range("E1").Value & ":" _
& Chr(10) & Range("F1").Value
.Comment.Visible = True
.Value = Range("F1").Value
End With

Range("F1").ClearContents
Range("F1").Select
Application.EnableEvents = True
End Sub

HTH
Regards,
Howard

"Gary" wrote in message
...
I have a drop down list that has Late and Left early. I am trying to add
notes to these two drop down items. That is if a manager puts in left
early
they get directed to a comments section so that they can add the reason,
and
review it at a future date.