If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Excel, Comment

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-06-06, 19:30
accessman2 accessman2 is offline
Registered User
 
Join Date: Sep 2005
Posts: 313
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.
Reply With Quote
  #2 (permalink)  
Old 04-06-06, 21:23
tcace tcace is offline
Registered User
 
Join Date: Apr 2004
Location: outside the rim
Posts: 968
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?
Reply With Quote
  #3 (permalink)  
Old 04-07-06, 12:07
shades shades is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On