+ Reply to Thread
Results 1 to 7 of 7

Can't show cell comment text in Msgbox

  1. #1
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,576

    Can't show cell comment text in Msgbox

    I can't show cell comment in Msgbox (look Line 133 of the code):

    Please Login or Register  to view this content.
    On module1 this works fine (you can run this macro on desired sheet where first one doesn't work).

    What I'm trying to do is comment that has contents in form of:
    Please Login or Register  to view this content.
    I'm trying to keep date and increase number.
    Until some point when Date need to be TODAY() and Number reset to 0 (this part works in Line 114).

    I just can't figure out why this Msgbox don't show anything...

    You can test it by running macro and for another running you should delete sheet 12.09.27.

    Example:

    12.09.20 H1 comment should have same date and Training: 2 on sheet 12.09.27
    12.09.20 I1 comment should have today date and Training: 0 on sheet 12.09.27 ' This works

    Does anybody see what I'm missing?
    Attached Files Attached Files
    Last edited by zbor; 10-02-2012 at 05:11 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: Can't show cell comment text in Msgbox

    The cell does not contain a comment until after you test the value of it.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,576

    Re: Can't show cell comment text in Msgbox

    Ahh, you are right...
    Thx Andy...
    I was confused with fact that Msgbox didn't even show a blank value...

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: Can't show cell comment text in Msgbox

    No error message due to the use of On Error Resume Next.

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,576

    Re: Can't show cell comment text in Msgbox

    I think on that and error doesn't appear even if you remove that part

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: Can't show cell comment text in Msgbox

    You had that code in there twice. Only 1 was commented out.

    Also this line fails for me.

    Please Login or Register  to view this content.
    I think it should be
    Please Login or Register  to view this content.

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,576

    Re: Can't show cell comment text in Msgbox

    I guess that's because of Regional settings..

    tdy is for example 2012.09.20,45111
    int(tdy) is 2012.09.20 and now I replace . with nothing to get number 20120920

+ 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