Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Adding formatting rules for Comments in Macro

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.TextFr ame.Characters.Font.Size
= 14

'rngCells.Areas(1).Cells(lCnt).Comment.Shape.TextF rame.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.TextFr ame.Characters.Font.Size
= 14

'rngCells.Areas(1).Cells(lCnt).Comment.Shape.TextF rame.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??

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 510
Default Adding formatting rules for Comments in Macro

Hi,

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

HTH
Cheers
Carim

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Adding formatting rules for Comments in Macro

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
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
Exporting conditional formatting rules Chadwill Excel Discussion (Misc queries) 16 April 30th 23 03:43 AM
conditional formatting - order of rules Andy the yeti Excel Discussion (Misc queries) 0 February 18th 09 02:15 PM
More than 3 rules of conditional formatting Mats K[_2_] Excel Discussion (Misc queries) 2 July 3rd 07 12:25 PM
Macro for Conditionally Formatting Comments Daren Excel Worksheet Functions 2 June 28th 07 02:02 AM
I need 5 conditional formatting rules-excel only allows 3 das1997 Excel Discussion (Misc queries) 4 November 12th 05 02:33 PM


All times are GMT +1. The time now is 03:29 AM.

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

About Us

"It's about Microsoft Excel"