![]() |
Comments
Hi All,
I have a macro that hides some columns. But it doesn't work if comments in the columns that are to be hidden have their protection property set to "Don't move or size with cells" Is there a macro I can write that changes the properties of all the comments to "Move but don't size with cells" All help is greatly appreciated -- _______________________ Naz, London |
Comments
Hi Naz,
From the macro recorder, might be able to use the line ".Placement = xlMove". Range("G5").AddComment Range("G5").Comment.Visible = False Range("G5").Comment.Text Text:="L. Howard Kittle:" & Chr(10) & "" With Selection .Placement = xlMove .PrintObject = True End With HTH Regards, Howard "Naz" wrote in message ... Hi All, I have a macro that hides some columns. But it doesn't work if comments in the columns that are to be hidden have their protection property set to "Don't move or size with cells" Is there a macro I can write that changes the properties of all the comments to "Move but don't size with cells" All help is greatly appreciated -- _______________________ Naz, London |
Comments
Thanks Howard but i don't think this is what i need.
Let me clarify, the comments are put in by other people as normal into a cell. Then when i run the macro it fails. What i need is a macro that selects all the comments on the sheet and changes the property. What i need is something like select all comments with selection .Placement= xlmove end with but i don't know how to select all the comments on a sheet. -- _______________________ Naz, London "L. Howard Kittle" wrote: Hi Naz, From the macro recorder, might be able to use the line ".Placement = xlMove". Range("G5").AddComment Range("G5").Comment.Visible = False Range("G5").Comment.Text Text:="L. Howard Kittle:" & Chr(10) & "" With Selection .Placement = xlMove .PrintObject = True End With HTH Regards, Howard "Naz" wrote in message ... Hi All, I have a macro that hides some columns. But it doesn't work if comments in the columns that are to be hidden have their protection property set to "Don't move or size with cells" Is there a macro I can write that changes the properties of all the comments to "Move but don't size with cells" All help is greatly appreciated -- _______________________ Naz, London |
Comments
Naz
Public Sub Comment_Place() Dim cmt As Comment Dim cmts As Comments Set cmts = ActiveSheet.Comments For Each cmt In cmts cmt.Shape.Placement = xlMove Next End Sub Gord Dibben Excel MVP On Sun, 23 Oct 2005 11:20:02 -0700, Naz wrote: Thanks Howard but i don't think this is what i need. Let me clarify, the comments are put in by other people as normal into a cell. Then when i run the macro it fails. What i need is a macro that selects all the comments on the sheet and changes the property. What i need is something like select all comments with selection .Placement= xlmove end with but i don't know how to select all the comments on a sheet. |
Comments
for each cmt in Activesheet.Comments
cmt.Placement= xlmove Next -- Regards, Tom Ogilvy "Naz" wrote in message ... Thanks Howard but i don't think this is what i need. Let me clarify, the comments are put in by other people as normal into a cell. Then when i run the macro it fails. What i need is a macro that selects all the comments on the sheet and changes the property. What i need is something like select all comments with selection .Placement= xlmove end with but i don't know how to select all the comments on a sheet. -- _______________________ Naz, London "L. Howard Kittle" wrote: Hi Naz, From the macro recorder, might be able to use the line ".Placement = xlMove". Range("G5").AddComment Range("G5").Comment.Visible = False Range("G5").Comment.Text Text:="L. Howard Kittle:" & Chr(10) & "" With Selection .Placement = xlMove .PrintObject = True End With HTH Regards, Howard "Naz" wrote in message ... Hi All, I have a macro that hides some columns. But it doesn't work if comments in the columns that are to be hidden have their protection property set to "Don't move or size with cells" Is there a macro I can write that changes the properties of all the comments to "Move but don't size with cells" All help is greatly appreciated -- _______________________ Naz, London |
All times are GMT +1. The time now is 01:31 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com