Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() XL2003 I'm trying to take the formatted text of a cell and put it into a comment. While it would be cool to format the colors, size and any other options that goes with Edit Comment | Format Comment, I would be satisfied to simply have the first line bold. Example of Stock Codes: Cell B1 = "*Local Stock:* Parts are on-hand" Cell B2 = "*Manufacturer Ship:* Parts ordered are shipped directly by Manufacturer" ... etc I'm using SELECT CASE code to determine my stock code which in turns points to the cell to be copied into the comment. --------------- Select Case rcStr ' Evaluate Stock Code. Case "A" commentText = Index.Range("B1").Text Case "B"... commentText = Index.Range("B2").Text Case "C"...etc End Select On Error Resume Next ws.Cells(niinRow, 6).AddComment With ws.Cells(niinRow, 6).Comment ..Visible = False ..Text Text:=commentText ..Shape.TextFrame.AutoSize = True ' code here to bold the first line, or End With ' code here to bold the first line? ---------- So far, the code works fine in that it replicates the linebreaks as entered on the source cells. I'm almost positive that I've seen an example from somewhere a few years ago that handles formatting, but now that I need it ... I'm thinking this may involve using FIND, LEN and or LEFT to locate where the first soft line break [Alt+Enter] and bold the string prior to it. But I've got zilch from searching archives and experimenting in this direction. TIA -- AH·C ------------------------------------------------------------------------ AH·C's Profile: http://www.excelforum.com/member.php...o&userid=29108 View this thread: http://www.excelforum.com/showthread...hreadid=496363 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel 2000 how to format the comments font all comments | Excel Discussion (Misc queries) | |||
Create Comments | Excel Worksheet Functions | |||
format for comments | Excel Discussion (Misc queries) | |||
Comments Format Help | Excel Worksheet Functions | |||
Create Excel sheet in HTML with comments | Excel Programming |