Hi,
Am a very inexperienced user of Excel, and am having a problem with changing a value from one figure to another, and then having the VBA code work within the excel spreadsheet (am sure it's something blindingly obvious, but can't figure it out!) - code I have currently is as follows;
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 8 Or Target.Row > 500 Then Exit Sub
If IsEmpty(Target) Then Exit Sub
Dim nt$, co$, cn$
nt = Target.Text
If Not Target.Comment Is Nothing Then
co = Target.Comment.Text & Chr(10) & Chr(10)
Else
co = ""
End If
On Error Resume Next
Target.Comment.Delete
Err.Clear
Target.AddComment
Target.Comment.Visible = False
Target.Comment.Text Text:=co & Format(VBA.Now, "MM/DD/YYYY at h:MM AM/PM") & Chr(10) & nt
Target.Comment.Shape.TextFrame.AutoSize = True
End Sub
I've highlighted the area I want to change the value - I want to increase the value from '500' to, say '1000' but just changing the value within the code doesn't work (i.e. the code doesn't work any further than the original '500' rows in column 8.
Any ideas greatly appreciated!
Moderator Note:
Pls use code tags around your code next time as per forum rules.
Bookmarks