akaj321akaj
New Member
- Joined
- May 23, 2011
- Messages
- 11
First off here is the code im using for this
What it does is it inserts a comment with the current date onto the cell that i just edited.
The problem im having with it is that whenever i goto edit the box that i just did it comes up with a error and doesnt work.
Im trying to make it to where i can delete the selected cell and it will also delete the comment, allowing me to enter a new value and it also add a new comment without crashing?
Any ideas on what i can do to make this work? its greatly appreciated!
HTML:
Private Sub worksheet_change(ByVal Target As Range)
'This sub is to record cell changes and use corresponding cells to record date time, user id and pc id.
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("A2:ae3000")) Is Nothing Then
Target.AddComment.Text Now & FindNetUserName & " " & FindComputerName
End If
If Target.Cells.Count > 1 Or Target.HasFormula Then Exit Sub
'this sub forces all text into uppercase
On Error Resume Next
Application.EnableEvents = False
Target = UCase(Target)
Application.EnableEvents = True
On Error GoTo 0
End Sub
The problem im having with it is that whenever i goto edit the box that i just did it comes up with a error and doesnt work.
Im trying to make it to where i can delete the selected cell and it will also delete the comment, allowing me to enter a new value and it also add a new comment without crashing?
Any ideas on what i can do to make this work? its greatly appreciated!