#1   Report Post  
Posted to microsoft.public.excel.programming
Naz Naz is offline
external usenet poster
 
Posts: 85
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 698
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
Naz Naz is offline
external usenet poster
 
Posts: 85
Default 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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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






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
excel 2000 how to format the comments font all comments Delquestion Excel Discussion (Misc queries) 1 October 8th 09 02:19 PM
comments Richard[_8_] Excel Discussion (Misc queries) 0 June 29th 08 07:04 PM
in excel useing comments how do you add clip art to comments? dhouse New Users to Excel 2 July 18th 07 08:14 AM
Comments Hatzipavlis Stratos Excel Programming 5 August 23rd 04 02:49 AM
Comments Steven K Excel Programming 1 February 2nd 04 08:26 PM


All times are GMT +1. The time now is 12:06 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"