PDA

View Full Version : Change comment properties XL2003



Sir Babydum GBE
08-08-2011, 11:13 AM
Hi

I recorder a macro where i added a comment, and resized it.

The recorded code is: ActiveCell.AddComment
ActiveCell.Comment.Visible = False
ActiveCell.Comment.Text Text:="qwerty"
Selection.ShapeRange.ScaleWidth 1.15, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1.55, msoFalse, msoScaleFromTopLeft


but when i run the code, i get the followng error "Application defined or object defined error". It debugs on the line:
Selection.ShapeRange.ScaleWidth 1.15, msoFalse,

Any ideas of a vba workaround so that i can create and resize comments?

Thanks

BD

Sir Babydum GBE
08-08-2011, 11:41 AM
Hi

I recorder a macro where i added a comment, and resized it.

The recorded code is: ActiveCell.AddComment
ActiveCell.Comment.Visible = False
ActiveCell.Comment.Text Text:="qwerty"
Selection.ShapeRange.ScaleWidth 1.15, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1.55, msoFalse, msoScaleFromTopLeft


but when i run the code, i get the followng error "Application defined or object defined error". It debugs on the line:
Selection.ShapeRange.ScaleWidth 1.15, msoFalse,

Any ideas of a vba workaround so that i can create and resize comments?

Thanks

BDIt's ok - I found the answer - sorry to trouble you all

BD