How do I re-size a comment box using VBA?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Hi,

Try,

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

Cheers
Andy
 
That worked!! Thanks Andy!

Andy Pope said:
Hi,

Try,

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

Cheers
Andy
 
Back
Top