PC Review


Reply
Thread Tools Rate Thread

Adding formatting rules for Comments in Macro

 
 
pmipalma
Guest
Posts: n/a
 
      9th Oct 2006
Hello All

I have the following macro at the moment

For Each cell In Range("AA19:AA95")
Cells(cell.Row, "G").NoteText Text:=cell.Text
Next
End Sub

It is an easy and quick way to have the data shows as comment in column
G

But now i want to format the data and received the code

rngCells.Areas(1).Cells(lCnt).Comment.Shape.TextFrame.Characters.Font.Size
= 14

'rngCells.Areas(1).Cells(lCnt).Comment.Shape.TextFrame.AutoSize = True
rngCells.Areas(1).Cells(lCnt).Cells.Comment.Shape.Width =
400
rngCells.Areas(1).Cells(lCnt).Cells.Comment.Shape.Height =
200

But when i will make the following code it is not working

For Each cell In Range("AA19:AA95")
Cells(cell.Row, "G").NoteText Text:=cell.Text
rngCells.Areas(1).Cells(lCnt).Comment.Shape.TextFrame.Characters.Font.Size
= 14

'rngCells.Areas(1).Cells(lCnt).Comment.Shape.TextFrame.AutoSize = True
rngCells.Areas(1).Cells(lCnt).Cells.Comment.Shape.Width =
400
rngCells.Areas(1).Cells(lCnt).Cells.Comment.Shape.Height =
200
Next
End Sub


What should i do to get all the Comment data been formatted correctly??

 
Reply With Quote
 
 
 
 
Carim
Guest
Posts: n/a
 
      9th Oct 2006
Hi,

In whatever range you select :
Range("A1").AddComment
Range("A1").Comment.Text Text:="Please format as follows...."

HTH
Cheers
Carim

 
Reply With Quote
 
pmipalma
Guest
Posts: n/a
 
      9th Oct 2006
Hi Carim,

Thanks for your answer.

But when i would use this it will not update automatically my field in
column G (G19:G95)

Can somebody send to me the complete coding for this please?

 
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
Macro for Conditionally Formatting Comments =?Utf-8?B?RGFyZW4=?= Microsoft Excel Worksheet Functions 2 28th Jun 2007 02:02 AM
Formatting Comments =?Utf-8?B?QXJjb25uYQ==?= Microsoft Word Document Management 1 6th May 2007 06:13 AM
Adding 4 rows after each total criteria in the column A with formatting and added text using macro. simplymidori76@gmail.com Microsoft Excel Programming 9 20th Mar 2007 06:08 PM
formatting of comments =?Utf-8?B?c3RldmU=?= Microsoft Excel Worksheet Functions 3 7th May 2005 01:18 AM
Formatting in Comments Box =?Utf-8?B?S2FyZW4=?= Microsoft Outlook Contacts 2 29th Apr 2005 11:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:24 AM.