Results 1 to 3 of 3

Thread: Excel, Comment

  1. #1
    Join Date
    Sep 2005
    Posts
    313

    Unanswered: Excel, Comment

    Hi,
    suppose the cmt is string variable


    cmt = "Invoice 1:" & Chr(10)
    cmt = cmt & "Num: 1" & Chr(10)
    cmt = cmt & "Company: Microsoft"
    cmt = cmt & Chr(10)
    cmt = cmt & "Invoice 2:" & Chr(10)
    cmt = cmt & "Num: 2" & Chr(10)
    cmt = cmt & "Company: IBM"

    .Worksheets(1).Cells(1, 5).AddComment cmt
    .Worksheets(1).Cells(1, 5).Comment.Shape.TextFrame.Characters.Font.Bold = False

    I used the above code to do the comment, but I want to set "Invoice 1" and "Invoice 2" to be Bold = True only.

    How can I change?

    Does anybody know that? Thanks.

  2. #2
    Join Date
    Apr 2004
    Location
    outside the rim
    Posts
    1,011
    The programming interface for Excel does not appear to give you format control over comments. Even the InterOp infor for .NET only references a Text String for this Object.

    Did you post this the Excel forum?

  3. #3
    Join Date
    Oct 2003
    Posts
    1,091
    I also have searched on this topic. While it can be done directly in Excel in the comment, I haven't found a VBA solution to changing part of that format.
    old, slow, and confused
    but at least I'm inconsistent!

    Rich
    (retired Excel 2003 user, 3/28/2008)

    How to ask a question on forums

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •