+ Reply to Thread
Results 1 to 5 of 5

range command doesn't show values when hovering cursor

  1. #1
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2016
    Posts
    313

    range command doesn't show values when hovering cursor

    I have what seems to me to be identical code trying to look at a cell value.

    When I'm running my macro in single step debug mode and hover my cursor over this command:
    Please Login or Register  to view this content.
    It displays the true value in the appropriate row in column "S" ** I is in for/next loop. This code works as intended.

    But I have another piece of code in the same for/next loop that doesn't show the value when I hover the cursor and also doesn't work properly:

    Please Login or Register  to view this content.

    I visually see that the cell value does not = "" but the code skips instructions following the "Then".

    Both column S and column D are defined as "General".

    Thanks for any assistance.

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: range command doesn't show values when hovering cursor

    Hi there,

    Neither of the ranges shown in the code you've posted is fully qualified - this means that the range will refer to whichever worksheet happens to be active when each line of code is executed. Is there any code between the two statements which changes the active worksheet?

    In general you should use fully-qualified references to avoid potential problems, e.g.:



    Please Login or Register  to view this content.

    or even


    Please Login or Register  to view this content.

    when you are dealing with more than a single workbook.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

  3. #3
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2016
    Posts
    313

    Re: range command doesn't show values when hovering cursor

    Hi Greg M

    Thank you so much for your response. There are 3 worksheets in the workbook, but I only run the macro from one worksheet and I don't change the active sheet anywhere in the macro.

    I will try your suggestion though and see if that will solve the issue. I have to leave for the evening but will try it out tomorrow and let you know the results.

    Another thing -- I don't have the .Value qualifier at the end of the command as you do in your sample. Wonder if that would make a difference although I don't have it on either of my commands.

  4. #4
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Jacksonville, Florida
    MS-Off Ver
    Excel 2016
    Posts
    313

    Re: range command doesn't show values when hovering cursor

    Hi Greg M,

    I make the change to fully qualify and the hovering over the command still did not work. I then used the not fully qualified command but added the "Value" parameter and that worked for the hovering. Then when I hovered in single step I could see the value. I was checking for value not equal to "" so when I hover it shows "Empty" but does not perform the statements following the "Then" parameter. In other words it goes to the 'End if' statement.

    I don't know if it has to do with the format of the cells in column "D" which is set to "General" but this solved my problem - I just fill the cells with a value "x" and change the if statement to check for that value. Thanks for your invaluable help!

    I will mark this post solved..

  5. #5
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: range command doesn't show values when hovering cursor

    Hi again,

    Many thanks for your feedback and also for the Reputation increase - much appreciated

    You're welcome - glad to hear that everything seems to be working correctly for you now.

    Best regards,

    Greg M

+ 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] The hovering hand for a Command button: how to get it?
    By cronshd in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-20-2021, 07:40 AM
  2. Lagging cursor when hovering over shapes with a macro assigned.
    By PlopNofear in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-06-2015, 05:51 AM
  3. Show message when hovering mouse over command button
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-10-2015, 02:26 PM
  4. Hovering cursor over columns doesn't give values
    By kesmithjr in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 05-09-2013, 09:27 AM
  5. Replies: 1
    Last Post: 01-03-2012, 08:38 PM
  6. Hovering over cells to show a date
    By cjboydell in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-06-2010, 08:22 AM
  7. [SOLVED] Excel cross cursor should be transparent when hovering over number
    By Bundaluk in forum Excel General
    Replies: 1
    Last Post: 02-04-2005, 05: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