Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Pete at Sappi Fine Paper
 
Posts: n/a
Default How do I re-size a comment box using VBA?

Recording a macro does not help - it gives:

Selection.ShapeRange.ScaleWidth 0.41, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 0.22, msoFalse, msoScaleFromTopLeft

But replacing "Selection" with "Range("B" & 15).comment" does not work.

Any ideas, please? Thanks!

Pete
  #2   Report Post  
Posted to microsoft.public.excel.misc
Andy Pope
 
Posts: n/a
Default How do I re-size a comment box using VBA?

Hi,

Try,

With Range("B" & 15).Comment.Shape
.ScaleWidth 0.41, msoFalse, msoScaleFromTopLeft
.ScaleHeight 0.22, msoFalse, msoScaleFromTopLeft
End With

Cheers
Andy

Pete at Sappi Fine Paper wrote:
Recording a macro does not help - it gives:

Selection.ShapeRange.ScaleWidth 0.41, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 0.22, msoFalse, msoScaleFromTopLeft

But replacing "Selection" with "Range("B" & 15).comment" does not work.

Any ideas, please? Thanks!

Pete


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
  #3   Report Post  
Posted to microsoft.public.excel.misc
Pete at Sappi Fine Paper
 
Posts: n/a
Default How do I re-size a comment box using VBA?

That worked!! Thanks Andy!

"Andy Pope" wrote:

Hi,

Try,

With Range("B" & 15).Comment.Shape
.ScaleWidth 0.41, msoFalse, msoScaleFromTopLeft
.ScaleHeight 0.22, msoFalse, msoScaleFromTopLeft
End With

Cheers
Andy

Pete at Sappi Fine Paper wrote:
Recording a macro does not help - it gives:

Selection.ShapeRange.ScaleWidth 0.41, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 0.22, msoFalse, msoScaleFromTopLeft

But replacing "Selection" with "Range("B" & 15).comment" does not work.

Any ideas, please? Thanks!

Pete


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info

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
How do I change default font size for comment boxes in Excel? Vormov Excel Discussion (Misc queries) 1 October 28th 05 09:33 PM
Comment size Don Excel Discussion (Misc queries) 1 October 26th 05 04:36 AM
Default cell comment fill color and font size Shadowman13 Excel Discussion (Misc queries) 2 September 28th 05 08:16 PM
Comment window size Eddie Excel Discussion (Misc queries) 1 March 24th 05 06:11 PM
changing comment indicator size or shape Mrocka Excel Worksheet Functions 1 December 13th 04 02:53 PM


All times are GMT +1. The time now is 07:21 PM.

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

About Us

"It's about Microsoft Excel"