Results 1 to 3 of 3

Adjust size of comment

Threaded View

  1. #1
    Forum Contributor
    Join Date
    08-22-2005
    Location
    Denmark
    MS-Off Ver
    Excel 365
    Posts
    349

    Adjust size of comment

    I need to adjust the size of comments to a certain pre-defined value, and for this a macro should be well suited, so I switched on the recorder while making the necessary steps. The result was as follows:
    Sub Macro1()
        Range("A2").AddComment
        Range("A2").Comment.Visible = False
        Selection.ShapeRange.ScaleWidth 2.48, msoFalse, msoScaleFromTopLeft
        Selection.ShapeRange.ScaleHeight 4.34, msoFalse, msoScaleFromTopLeft
    End Sub
    But now when I try to run the macro on another cell I get a "Run-time error '438' Object doesn't support this property or method".

    Which code will adjust the size of a comment?

    NSV
    Last edited by nsv; 11-07-2012 at 06:36 AM. Reason: Solved, but then not completely solved

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1