AlexanderBB
Well-known Member
- Joined
- Jul 1, 2009
- Messages
- 2,072
- Office Version
- 2019
- 2010
- Platform
- Windows
Attempting to write a Comment with
And I call this with
It usually works... but is starting to fail with Run Time error 1004 Application-defined or object-defined error.
Is there any known reason for this?
Code:
Sub WriteComment(r as Range, T)
with r
if not .Comment is Nothing Then
.comment.Delete
end if
.addComment T
end with
End Sub
And I call this with
Code:
Dim CRange as Range
Set CRange = WorkSheets(SheetName).cells(RowNumber,ColoumLetter)
WriteTheComment cRange, theText
It usually works... but is starting to fail with Run Time error 1004 Application-defined or object-defined error.
Is there any known reason for this?