Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Comments formating performance
I need help with writing better performance code for comments formating. Here is my code: For Each c In Cells.SpecialCells(xlCellTypeComments) c.Comment.Visible = True c.Comment.Shape.Select True With Selection Placement = xlMoveAndSize PrintObject = True AutoSize = True Left = c.Left + c.Width + 3 Top = c.Top + 2 End With c.Comment.Visible = False Next c In sheet with ~550 comments it takes about 4 minutes. Do you have any ideas ? -- Vladimir Sveda ------------------------------------------------------------------------ Vladimir Sveda's Profile: http://www.excelforum.com/member.php...o&userid=36985 View this thread: http://www.excelforum.com/showthread...hreadid=567079 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Comments formating performance
Sub Test2()
Dim cm As Comment Dim lt As Single, tp As Single 'Application.ScreenUpdating = False For Each cm In ActiveSheet.Comments ' all comments ? With cm With .Parent lt = .Left + .Width + 3 tp = .Top + 2 End With With .Shape With .DrawingObject .PrintObject = True .AutoSize = True .Placement = xlMoveAndSize End With .Left = lt .Top = tp End With End With Next 'Application.ScreenUpdating = True End Sub Regards, Peter T "Vladimir Sveda" <Vladimir.Sveda.2bvas3_1154446209.7824@excelforu m-nospam.com wrote in message news:Vladimir.Sveda.2bvas3_1154446209.7824@excelfo rum-nospam.com... I need help with writing better performance code for comments formating. Here is my code: For Each c In Cells.SpecialCells(xlCellTypeComments) c.Comment.Visible = True c.Comment.Shape.Select True With Selection Placement = xlMoveAndSize PrintObject = True AutoSize = True Left = c.Left + c.Width + 3 Top = c.Top + 2 End With c.Comment.Visible = False Next c In sheet with ~550 comments it takes about 4 minutes. Do you have any ideas ? -- Vladimir Sveda ------------------------------------------------------------------------ Vladimir Sveda's Profile: http://www.excelforum.com/member.php...o&userid=36985 View this thread: http://www.excelforum.com/showthread...hreadid=567079 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel 2000 how to format the comments font all comments | Excel Discussion (Misc queries) | |||
Formating cells with comments attached | Excel Discussion (Misc queries) | |||
in excel useing comments how do you add clip art to comments? | New Users to Excel | |||
Comments formating performance | Excel Programming | |||
Install dates formating using conditional formating? | Excel Discussion (Misc queries) |