PC Review


Reply
 
 
lopina
Guest
Posts: n/a
 
      2nd Jan 2009
Hello!!!

I wont to make macro who is going to make letters larger in all comments
that I have in may workbook.

And if its possible when I write new comment to have larger letter.

Thanks for any help
best regards
ivica


 
Reply With Quote
 
 
 
 
Gary''s Student
Guest
Posts: n/a
 
      2nd Jan 2009
See:

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


--
Gary''s Student - gsnu2007k


"lopina" wrote:

> Hello!!!
>
> I wont to make macro who is going to make letters larger in all comments
> that I have in may workbook.
>
> And if its possible when I write new comment to have larger letter.
>
> Thanks for any help
> best regards
> ivica
>
>
>

 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      3rd Jan 2009
Gary''s Student has given you a link for a macro that you can use to change
all your existing Comments to the size you want (see "Format All Comments"
at the link). However, this doesn't address your other question of how to
change newly inserted Comments (obviously, without having to remember to run
the macro each time). There is a minor problem with being able to do this
since inserting a Comment does not trigger any events, so the VBA world has
no way of knowing it happened. I can give you code that *almost* does what
you want... it will not change the Comment's size when it is inserted unless
you change the active cell's location or select another sheet. That means if
you insert a Comment and click back into that same cell, the Comment's size
will not have changed... however, as soon as you click into another cell or
select another sheet, the Comment you just inserted will have its text size
changed.

Here is the event code that does this. To install it, right click the Excel
icon immediately to the left of the File menu item and select View Code.
Doing this will bring up the ThisWorkbook code window... simply copy/paste
the following into that window...

'************ START OF CODE ************
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
HandleCommentSizing
End Sub

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, _
ByVal Target As Range)
HandleCommentSizing
End Sub

Sub HandleCommentSizing()
Static PrevCellAddress As String
Static PrevCellSheetName As String
If Len(PrevCellAddress) > 0 Then
With Worksheets(PrevCellSheetName).Range(PrevCellAddress)
If Not .Comment Is Nothing Then
If .Comment.Shape.TextFrame.Characters.Font.Size <> 14 Then
.Comment.Shape.TextFrame.Characters.Font.Size = 14
End If
End If
End With
End If
PrevCellAddress = ActiveCell.Address
PrevCellSheetName = ActiveCell.Parent.Name
End Sub
'************ END OF CODE ************

--
Rick (MVP - Excel)


"lopina" <(E-Mail Removed)> wrote in message
news:gjm4v9$905$(E-Mail Removed)...
> Hello!!!
>
> I wont to make macro who is going to make letters larger in all comments
> that I have in may workbook.
>
> And if its possible when I write new comment to have larger letter.
>
> Thanks for any help
> best regards
> ivica
>


 
Reply With Quote
 
lopina
Guest
Posts: n/a
 
      3rd Jan 2009
This code will do just fine for me

Thanks for help

regards
lopina




"Rick Rothstein" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Gary''s Student has given you a link for a macro that you can use to
> change all your existing Comments to the size you want (see "Format All
> Comments" at the link). However, this doesn't address your other question
> of how to change newly inserted Comments (obviously, without having to
> remember to run the macro each time). There is a minor problem with being
> able to do this since inserting a Comment does not trigger any events, so
> the VBA world has no way of knowing it happened. I can give you code that
> *almost* does what you want... it will not change the Comment's size when
> it is inserted unless you change the active cell's location or select
> another sheet. That means if you insert a Comment and click back into that
> same cell, the Comment's size will not have changed... however, as soon as
> you click into another cell or select another sheet, the Comment you just
> inserted will have its text size changed.
>
> Here is the event code that does this. To install it, right click the
> Excel icon immediately to the left of the File menu item and select View
> Code. Doing this will bring up the ThisWorkbook code window... simply
> copy/paste the following into that window...
>
> '************ START OF CODE ************
> Private Sub Workbook_SheetActivate(ByVal Sh As Object)
> HandleCommentSizing
> End Sub
>
> Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, _
> ByVal Target As Range)
> HandleCommentSizing
> End Sub
>
> Sub HandleCommentSizing()
> Static PrevCellAddress As String
> Static PrevCellSheetName As String
> If Len(PrevCellAddress) > 0 Then
> With Worksheets(PrevCellSheetName).Range(PrevCellAddress)
> If Not .Comment Is Nothing Then
> If .Comment.Shape.TextFrame.Characters.Font.Size <> 14 Then
> .Comment.Shape.TextFrame.Characters.Font.Size = 14
> End If
> End If
> End With
> End If
> PrevCellAddress = ActiveCell.Address
> PrevCellSheetName = ActiveCell.Parent.Name
> End Sub
> '************ END OF CODE ************
>
> --
> Rick (MVP - Excel)
>
>
> "lopina" <(E-Mail Removed)> wrote in message
> news:gjm4v9$905$(E-Mail Removed)...
>> Hello!!!
>>
>> I wont to make macro who is going to make letters larger in all comments
>> that I have in may workbook.
>>
>> And if its possible when I write new comment to have larger letter.
>>
>> Thanks for any help
>> best regards
>> ivica
>>

>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Edit Comment erases part of screen; comment uneditable Charles Blaquière Microsoft Excel Discussion 0 10th Sep 2008 08:31 PM
Mouse-over on comment highlights barely shows comment text GordonM Microsoft Word Document Management 0 9th Apr 2008 01:13 AM
Comment features - changing the colour of comment ballons =?Utf-8?B?TG9vcHN0ZXI=?= Microsoft Word Document Management 1 10th Jun 2007 10:19 PM
a comment plugin & copy paste directly from excel to comment ? fr. =?Utf-8?B?UkZN?= Microsoft Excel Worksheet Functions 0 1st Dec 2004 11:29 PM
Re: after updating or entering a comment, the date is entered into that comment John Vinson Microsoft Access 0 4th Jun 2004 01:49 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:38 PM.