+ Reply to Thread
Results 1 to 5 of 5

Adding a variable string comment to a cell. "Object Variable or WIth Block Variable Not.."

  1. #1
    Registered User
    Join Date
    06-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    64

    Adding a variable string comment to a cell. "Object Variable or WIth Block Variable Not.."

    So this is the relevant portion of code.
    The error comes up with the last line where I add the comment.

    Please Login or Register  to view this content.

    I just tested the string with this line

    Please Login or Register  to view this content.
    and the cell turns the appropriate value, so the string functions perfectly.
    Not sure what the error is with adding the comment.
    Any ideas?

    Thanks a lot in advance

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Adding a variable string comment to a cell. "Object Variable or WIth Block Variable No

    where do you set TickersResults?
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    06-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    64

    Re: Adding a variable string comment to a cell. "Object Variable or WIth Block Variable No

    Please Login or Register  to view this content.
    this is the full code.

    It's set somewhere near the top, but still within the macro so I thought that would do fine?

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Adding a variable string comment to a cell. "Object Variable or WIth Block Variable No

    no-you set TickerResults not TickersResults

    learn to use Option Explicit ;-)

  5. #5
    Registered User
    Join Date
    06-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    64

    Re: Adding a variable string comment to a cell. "Object Variable or WIth Block Variable No

    ...Oh my goodness.
    Sorry about that.
    And I'll look into Option Explicit -- I've seen it before but haven't ever actually used it.

    Thanks for your help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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