Changing Comment Box Color

  • How do I use VB to change the comment box color to blue. The code i have now defualts to red.




    Where do i tell it to turn it blue and how do I do that???

  • Re: Changing Comment Box Color


    Hi,


    In a new spreadsheet, record a macro of you inserting a comment and whilst doing it, change the Fill colour on the Drawing toolbar.


    This should give you the code for you to hack apart.


    It's all covered pretty well in the Help files.


    However - On my corporate branded castrated version of Windows, the option doesn't work as most of my Control Panel icons don't exist - one of these selects the default background colour for tips and is, I think involved somehow.


    Good luck


    John

  • Re: Changing Comment Box Color


    You cant. THere is no option to change the color inside of excel. I can change shape and everything else. Do you have an idea of the code i need to use to change to color of this???

  • Re: Changing Comment Box Color


    Hi,


    You should be careful what you say cannot be done on this forum.

    Code
    Range("D6").Comment.Visible = True
        Range("D6").Comment.Shape.Select True
        Selection.ShapeRange.Fill.Visible = msoTrue
        Selection.ShapeRange.Fill.ForeColor.SchemeColor = 10


    :)

  • Re: Changing Comment Box Color


    Hi,


    Badgers code works for me.


    From where are you calling the code?
    What version of Excel are you running?
    Is the sheet protected in any way?
    What code surrounds badgers code?
    Have you tried stepping thru to locate the source of the error?


    Please advise (and if poss post your workbook)


    John

  • Re: Changing Comment Box Color


    I uploaded it. I am running 2k3 excel. Im calling the code from the first

  • Re: Changing Comment Box Color


    I imagine it is because you are trying to add to one range as a whole.


    Maybe best to do a cell at a time.


  • Re: Changing Comment Box Color


    It adds blue comments to the cells as you requested. If you worksheet looks blue then your comments are visible.


    I adapted the code a bit more now.


  • Sorry


    Ok my appologizes. What i wanted is to change was the little comment tag the triangle in the upper part of the cell. Please forgive me if i have wasted your time. I need that to be blue now the actully comment box. My appologies again.

  • Re: Changing Comment Box Color


    Quote

    You should be careful what you say cannot be done on this forum.


    LOL - I like that, but it looks like he might have something that can't be done.


    Quote

    What i wanted is to change was the little comment tag the triangle in the upper part of the cell.

    If it can't be done in Excel, it doesn't need to be done at all.

  • Re: Sorry


    OK bit of a mix up here. Never mind.


    I did not know an easy way to change this but googled and the first thing i saw was this.


    http://www.contextures.com/xlcomments03.html#Indicator


    seems a bit of a stupid work around but if it floats you boat give it a go.


    I imagine it is possible another way but I do not have time to figure it out now.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!