I have over 50 blank Notes on a sheet in Excel I need to be able to update and add something to all of them and they are in merged cells. What is the VBA code to do this I can't figure it out?
Any help would be appreciated.
thanks, guys!
My VBA Code
Any help would be appreciated.
thanks, guys!
My VBA Code
VBA Code:
Sub My_FIX_Notes()
' This Macro will change all Note Comments to Transparent Blue Background & Bold White Text
CommentCount = 0
Dim MyComments As Comment
Dim LArea As Long
Dim fixed As Boolean
fixed = False
For Each MyComments In ActiveSheet.Comments
With MyComments
' .Shape.Fill.OneColorGradient msoGradientDiagonalUp, 1, 0.23
.Shape.AutoShapeType = msoShapeRoundedRectangle
.Shape.TextFrame.Characters.Font.Name = "Arial"
.Shape.TextFrame.Characters.Font.Size = 12
.Shape.TextFrame.Characters.Font.ColorIndex = 2
.Shape.Line.ForeColor.RGB = RGB(0, 0, 0)
.Shape.Line.BackColor.RGB = RGB(255, 255, 255)
.Shape.Fill.Visible = msoTrue
.Shape.TextFrame.Characters.Font.Bold = True
.Shape.Fill.BackColor.RGB = RGB(58, 82, 184)
' This fills background color of the Note and sets the transarancey to 0.04
.Shape.Fill.ForeColor.RGB = RGB(85, 85, 110)
.Shape.Fill.Transparency = 0.04
'This Sets the With & Height of each Note Comment Hotkey
MyComments.Shape.Width = 200
MyComments.Shape.Height = 40
CommentCount = CommentCount + 1
End With
Next 'comment
If CommentCount > 0 Then
'MsgBox ("A total of " & CommentCount & " comments in worksheet '" & MySheet.Name & "' of workbook '" & MyWorkbook.Name & "'" & Chr(13) & "were repositioned and resized.")
MsgBox ("A Total Of " & CommentCount & "" & "Were change")
fixed = True
End If
'Next
' Next MyWorkbook
'thisfile.Activate
If fixed = False Then
MsgBox ("No comments were detected.")
End If
On Error GoTo 0
Exit Sub
End Sub