Stops at certain row with Error 91
ARGGGHH!
I failed to mention that this was the first time these cells had
Comments added. Or so I thought.
I assumed (that always gets ya!) that Comment.Text String would SET a
Comment if not there. Nope, ya gotta use the AddComment!
After some rereading in help file, I realized my mistake.
So here's the working code segment.
Thanks, Tom!
Set Cmt = Rng.Comment
If Cmt Is Nothing Then
ASheet.Range("D" & CStr(A)).AddComment.Text
AACData(EleNum)(1)
ASheet.Range("D" &
CStr(A)).Comment.Shape.TextFrame.Characters.Font.S ize = 16
Else
ASheet.Range("D" & CStr(A)).Comment.Text AACData(EleNum)(1)
ASheet.Range("D" &
CStr(A)).Comment.Shape.TextFrame.Characters.Font.S ize = 16
End If
|