Toon posts:

rode driehoekje Excel

Pagina: 1
Acties:
  • 128 views sinds 30-01-2008
  • Reageer

Verwijderd

Topicstarter
Ik wil graag het rode driehoekje in Excel als je een opmerking invoegt van kleur laten veranderen.
hoe doe ik dat? :|

  • BtM909
  • Registratie: Juni 2000
  • Niet online

BtM909

Watch out Guys...

Zoeken naar je titel in het Engels levert mij via deze pagina (http://www.mvps.org/dmcritchie/excel/ccomment.htm) twee relevante linkjes op:

http://groups.google.com/...034ca9d0#e9ea7203034ca9d0
http://groups.google.com/...c3d7fe07#681264f6c3d7fe07
http://www.mvps.org/dmcritchie/excel/colors.htm#triangles

Kort gezegd: het kan niet standaard, maar er zijn wel custom mogelijkheden hiervoor :)

Ace of Base vs Charli XCX - All That She Boom Claps (RMT) | Clean Bandit vs Galantis - I'd Rather Be You (RMT)
You've moved up on my notch-list. You have 1 notch
I have a black belt in Kung Flu.


Verwijderd

Topicstarter
Ok, maar op die pagina's laten ze codes zien....
Geen idee wat ik daarmee moet doen

Dit bijv:

Option Explicit


Public Function fncCreateCommentIndicator(CommentIndicatorColor) As
Boolean
'covers the comment indicators in the activeworkbook with a similar
triangle
'of the specified color, based on the user name
Dim IDnumber As Long
Dim aCell As Range
Dim aComment As Comment
Dim aShape As Shape
Dim aWorksheet As Worksheet
Dim aWorkbook As Workbook
fncCreateCommentIndicator = False
On Error GoTo ExitFunction
Set aWorkbook = ActiveWorkbook
IDnumber = 0
For Each aWorksheet In aWorkbook.Worksheets
For Each aShape In aWorksheet.Shapes
If Left(aShape.Name, Len("CommentIndicator")) =
"CommentIndicator" Then
aShape.Delete
End If
Next aShape
For Each aComment In aWorksheet.Comments
Set aCell = aComment.Parent
If InStr(1, aComment.Shape.TextFrame.Characters.Text, ":") >
0 Then
If Left(aComment.Shape.TextFrame.Characters.Text, InStr(1,
aComment.Shape.TextFrame.Characters.Text, ":") - 1) =
Application.UserName Then
GoSub CreateCommentIndicator
End If
End If
Next aComment
Next aWorksheet
fncCreateCommentIndicator = True
ExitFunction:
On Error GoTo 0
Set aCell = Nothing
Set aComment = Nothing
Set aShape = Nothing
Set aWorksheet = Nothing
Set aWorkbook = Nothing
Exit Function
CreateCommentIndicator:
Set aShape = aWorksheet.Shapes.AddShape(Type:=msoShapeRightTriangle, _
Left:=aCell.Left + aCell.Width
- 5, _
Top:=aCell.Top, _
Width:=5, _
Height:=5)
IDnumber = IDnumber + 1
With aShape
.Name = "CommentIndicator" & CStr(IDnumber)
.IncrementRotation -180#
.Fill.Visible = msoTrue
.Fill.Solid
.Fill.ForeColor.RGB = CommentIndicatorColor
.Line.Visible = msoTrue
.Line.Weight = 1
.Line.Style = msoLineSingle
.Line.DashStyle = msoLineSolid
.Line.ForeColor.RGB = CommentIndicatorColor
End With
Return
End Function


Sub test_fncCreateCommentIndicator()
fncCreateCommentIndicator vbGreen
End Sub

[ Voor 94% gewijzigd door Verwijderd op 05-07-2006 20:52 ]


  • Totalmind
  • Registratie: April 2005
  • Laatst online: 11-07-2022

Totalmind

Division Brabant

Ziet eruit als een macro in visual basic die je samen met het blad zou moeten openen

http://www.divisionbrabant.nl


Verwijderd

Topicstarter
maar hoe doe je dat

  • Totalmind
  • Registratie: April 2005
  • Laatst online: 11-07-2022

Totalmind

Division Brabant

excel starten

extra -> macro -> visual basic editor

krijg je visual basic scherm

rechter muisknop op schermpje linksbovenin

invoegen -> module

code inplakken

(je voorbeeld is alleen geen macro, maar een explicit option, maar dat kan dus ook hier in een module)

http://www.divisionbrabant.nl

Pagina: 1