+ Reply to Thread
Results 1 to 9 of 9

Insert comment

  1. #1
    Registered User
    Join Date
    10-10-2017
    Location
    North Charleston, SC
    MS-Off Ver
    2016
    Posts
    72

    Insert comment

    Hello all!!

    I thought this would be simple but that's what I get for thinkin lol!!! I am just trying to add a comment with text in it if a cell text value is a matching value!
    I've tried this but to no avail!! Note is a macro that I created but if there is a better way, that's even better!

    TIA


    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    601

    Re: Insert comment

    You'll need to post the code for your Note macro, as well as explaining exactly what the undesired results are. Even better would be attaching a sample workbook, which you can do by clicking Go Advanced, then Manage Attachments.

  3. #3
    Registered User
    Join Date
    10-10-2017
    Location
    North Charleston, SC
    MS-Off Ver
    2016
    Posts
    72

    Re: Insert comment

    Quote Originally Posted by Melvosh View Post
    You'll need to post the code for your Note macro, as well as explaining exactly what the undesired results are. Even better would be attaching a sample workbook, which you can do by clicking Go Advanced, then Manage Attachments.
    I've removed the macro that I had just to simplify the process. I would like to do it without a macro if possible! No personal info involved here!
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    601

    Re: Insert comment

    Based on your workbook, this should do what you want:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-10-2017
    Location
    North Charleston, SC
    MS-Off Ver
    2016
    Posts
    72

    Re: Insert comment

    I use the basic form from excel when entering these things. Makes thing a little easier. It works doing it without the form but not with it. Is there something different to put in the code? Otherwise, it works manually!

  6. #6
    Valued Forum Contributor
    Join Date
    01-07-2013
    Location
    Michigan
    MS-Off Ver
    O365
    Posts
    601

    Re: Insert comment

    It's my understanding that macros are put on hold while the built-in data form is open. I haven't worked with the built-in form in the past, so I don't know how well it plays with VBA. You might be able to call the form with a macro, and within that macro test for changes, but that's beyond my skillset. I'll see if I can get other folks in on this one.

  7. #7
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Insert comment

    Quote Originally Posted by jarhead58 View Post
    I use the basic form from excel when entering these things
    What do you class as a basic form? Userform? Inputbox? Something else?

    There is no evidence of any form in your sample, so there is nothing to link the code to.

    If it's a userform then adding False at the end of the .Show line should allow other code to run while it is open, but you will still need to call each part correctly to ensure that it does what is required.

  8. #8
    Registered User
    Join Date
    10-10-2017
    Location
    North Charleston, SC
    MS-Off Ver
    2016
    Posts
    72

    Re: Insert comment

    I was using the Excel form from the command items which is on the Toolbar. I ended up just creating my own form while I was waiting. I also put a line of code that, I believe, should sort the data from newest to oldest. Literally just finished it. I'll upload what I have. It appears that part isn't working. I did get the Comment part to work though finally!
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Insert comment

    There is another problem that it looks like you missed. Your form is not adding new entries to the list, it just keeps overwriting the first entry.

    The cause is in this line
    Please Login or Register  to view this content.
    Column H is empty, so NR is always going to be 1. With the +1 at the end of the line, the code is only ever going to run on row 2. Changing "H" to "A" will sort that and everything should run as expected.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA to Insert Comment
    By mjr55 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-30-2017, 04:13 PM
  2. Complex VBA problem auto insert date and time, auto insert comment, etc.
    By rojashan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-29-2013, 09:40 PM
  3. Insert .PDF into Cell Comment
    By davesexcel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-13-2009, 03:48 PM
  4. Insert comment
    By vasto in forum Excel General
    Replies: 3
    Last Post: 06-09-2009, 11:09 AM
  5. Insert images into a comment
    By Vlad999 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-12-2008, 01:34 AM
  6. [SOLVED] how do I insert image in a comment?
    By t23augusto in forum Excel General
    Replies: 1
    Last Post: 07-30-2005, 08:05 PM
  7. Replies: 0
    Last Post: 05-18-2005, 08:06 PM

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