Consulting

Results 1 to 4 of 4

Thread: autosize a comment

  1. #1
    VBAX Mentor
    Joined
    Jun 2005
    Posts
    374
    Location

    autosize a comment

    hello
    can anyone suggest a code for autosizing comments?
    thanks
    moshe

  2. #2
    VBAX Contributor
    Joined
    Oct 2004
    Posts
    159
    Location
    Comment resize by area

    [VBA]
    For Each cmt In ActiveSheet.Comments
    With cmt
    If Not Intersect(.Parent, Selection) Is Nothing Then
    .Shape.TextFrame.AutoSize = True
    If .Shape.Width > 300 Then
    lArea = .Shape.Width * .Shape.Height
    .Shape.Width = 300
    .Shape.Height = (lArea / 300) * 1.2
    End If
    End If
    End With
    Next
    [/VBA]

  3. #3
    where do you drop this code??? into the 'this workbook' module?

  4. #4
    VBAX Contributor
    Joined
    Oct 2004
    Posts
    159
    Location
    I placed in a standard module

Posting Permissions

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