+ Reply to Thread
Results 1 to 5 of 5

Create comment box from cell values

  1. #1
    Registered User
    Join Date
    12-15-2005
    Posts
    42

    Create comment box from cell values

    I want to create a comment box in cell A1 on Sheet 1 using a macro.
    The comment box will have 3 lines of text.
    Line 1 = text from cell A1 on sheet 2.
    Line 2 = text from cell F1 on sheet 2.
    Line 3 = text from cell E1 on sheet 2.

    I want to eventually create 100 comment boxes on Sheet 1 with information from sheet 2.
    Not sure how to start this ... thanks for any assistance.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Create comment box from cell values

    You could use a UDF:

    Please Login or Register  to view this content.
    In any convenient cell on Sheet1,

    =SetComment(A1, Sheet2!A1 & CHAR(10) & Sheet2!F1 & CHAR(10) & Sheet2!E1)
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    12-15-2005
    Posts
    42

    Re: Create comment box from cell values

    Thanks shg!
    This works fine.
    If I am going to add similar comments for 99 other cells, is it best to just add 99 formulas in convenient cells on Sheet 1 or is it best to do it all in vba?

    Thanks again for your help ... I am going to mark this "solved" as it does exactly what I want!

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Create comment box from cell values

    The advantage of formulas is that the references automatically adjust with insertions and deletions (other than deleting a referenced cell).

    The advantage of VBA is that it puts everything in one place, and avoids a lot of formulas that will likely confuse people.

  5. #5
    Registered User
    Join Date
    12-15-2005
    Posts
    42

    Re: Create comment box from cell values

    Yes, I see that now ... I believe I will stick with the formulas so that when I edit my sheet2 information the comments will automatically update without having to run a macro to update.

    Thanks again!

+ 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