Copy data from a user form to a comment

J

Jock

Hi all,
How easy would it be to:
1) When a date is entered in column E, open a user form so the user can type
in names;
2) When names are all entered, when user form is closed the names are copied
to a newly created comment box in D (on the same row)?

Once names have been copied over to the comment, there is no need to save
them elsewhere.
Perhaps it would be easier to have the comment visible on screen rather than
use a user form at all and the user can then type directly into it??

Thanks,
 
J

Jacob Skaria

Right click on the Sheet tab>ViewCode and copy the below code. Try entering a
date to ColE and feedback.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 5 Then
If IsDate(Target.Value) = True Then
Range("D" & Target.Row).AddComment "Enter Names"
Range("D" & Target.Row).Comment.Visible = True
End If
End If
End Sub


If this post helps click Yes
 
J

Jock

Hi Jacob,
How do I get the comment to 'auto hide' once the names have been entered and
the user has moved out of the comment box?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top