Op site Contextures heb ik enkele codes gevonden waarmee het rode driehoekje kan worden aangepast enz. Helaas de code om het rode driehoekje te verwijderen (verbergen) niet (ook als resultaat eigen aanpassingen) gevonden. Wie weet hoe de code aangepast moet worden? Alvast bedankt.
Met vriendelijke groet,
Esko
Met vriendelijke groet,
Esko
Code:
Sub CoverCommentIndicator()
Dim ws As Worksheet
Dim cmt As Comment
Dim lCmt As Long
Dim rngCmt As Range
Dim shpCmt As Shape
Dim shpW As Double 'shape width
Dim shpH As Double 'shape height[SIZE="3"][/SIZE]
Set ws = ActiveSheet
shpW = 4 ' 8
shpH = 2 '6
lCmt = 1
'clear old numbers
RemoveIndicatorShapes
For Each cmt In ws.Comments
Set rngCmt = cmt.Parent
With rngCmt
Set shpCmt = ws.Shapes.AddShape(msoShapeRectangle, _
rngCmt.Offset(0, 1).Left - shpW, .Top, shpW, shpH)
End With
With shpCmt
.Name = "CmtNum" & .Name
With .Fill
.ForeColor.SchemeColor = 9 'white
.Visible = msoTrue
.Solid
End With
With .Line
.Visible = msoFalse 'True
.ForeColor.SchemeColor = 9 '64 'automatic
.Weight = 0.15 ' 0.25
End With
With .TextFrame
.Characters.Text = lCmt
.Characters.Font.Size = 3 '4
.MarginLeft = 0#
.MarginRight = 0#
.MarginTop = 20 '0#
.MarginBottom = 0#
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlTop
End With
.Top = .Top - 0.001
End With
lCmt = lCmt + 1
Next cmt
End Sub
Bijlagen
Laatst bewerkt: