+ Reply to Thread
Results 1 to 2 of 2

Macro to create comment box on any given selected cell.

  1. #1
    Registered User
    Join Date
    02-13-2013
    Location
    Tacoma, WA
    MS-Off Ver
    Excel 2010
    Posts
    1

    Macro to create comment box on any given selected cell.

    Hi guys, I'm having trouble finding a solution for my specific issue. I want to select a cell, then run a macro that will create a comment box, resize and move it. I've recorded a macro that works only on a one cell in particular. This action seems like it should be simple yet I can't figure it out nor can I find any website that addresses it, So I'm guessing it's not so simple. The sheet application it's applying to is a calibration database. Each tool has a done date and a due date. I would like to be able to run this on any due date cell for tools that have been brought into the calibration lab. I have the due date calculated with a formula that uses the done date and the calibration intervals. So I can't simply change the Done cell to "In Cal Lab" or it will return an #VALUE! error. The code I have so far is:



    Sub InCalLab()
    '
    ' InCalLab Macro
    '

    '
    Range("G16").AddComment
    Range("G16").Comment.Visible = True
    Range("G16").Comment.Text Text:="In Cal Lab"
    Selection.ShapeRange.ScaleWidth 0.41, msoFalse, msoScaleFromTopLeft
    Selection.ShapeRange.ScaleHeight 0.19, msoFalse, msoScaleFromTopLeft
    Selection.ShapeRange.IncrementLeft -54.75
    Selection.ShapeRange.IncrementTop 7.5
    Range("E17").Select
    End Sub


    This code also gives a runtime error '438': that says "Object does not support this property or method". and stops before it resizes or moves the comment box.

    Any ideas how to proceed?

  2. #2
    Registered User
    Join Date
    02-11-2013
    Location
    Chennai
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Macro to create comment box on any given selected cell.

    the cell have a comment already , i want to add another comment on previous comment

+ Reply to Thread

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