Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Format comment username

A slight change to Debra's code:

Option Explicit

Sub CommentAddOrEdit()

Dim cmt As Comment

Set cmt = ActiveCell.Comment
If cmt Is Nothing Then
ActiveCell.AddComment Text:="Note: "
Set cmt = ActiveCell.Comment
With cmt.Shape.TextFrame.Characters(Start:=1, Length:=6).Font
.Bold = True
End With
End If
SendKeys "%ie~"

End Sub


Bill wrote:

I want a macro that has Note: instead of username, in bold
and then pauses for the rest of the text.
From www.contextures.com I found.

Sub CommentAddOrEdit()
'adds new plain text comment or positions
'cursor at end of existing comment text
Dim cmt As Comment
Set cmt = ActiveCell.Comment
If cmt Is Nothing Then
ActiveCell.AddComment text:="Note: "
End If
SendKeys "%ie~"
End Sub

But how do I make the Note: bold and reset to normal for
text input.

Thanks


--

Dave Peterson

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
comment format whiskeyromeo Excel Discussion (Misc queries) 2 February 18th 10 08:00 PM
How can i set preliminary format for comment box? rattwattana Setting up and Configuration of Excel 1 December 11th 08 06:49 PM
How to change comment format? [email protected] Excel Discussion (Misc queries) 3 May 27th 07 09:59 PM
Decide comment format 'globally'? Restore format with ws_change? tskogstrom Excel Discussion (Misc queries) 0 April 16th 07 09:07 AM
How do I set up the default format for a comment? Gitesh Excel Discussion (Misc queries) 1 April 1st 05 11:18 PM


All times are GMT +1. The time now is 11:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"