+ Reply to Thread
Results 1 to 20 of 20

How to get a pop-up tip when the user hovers the mouse over a command and option button

  1. #1
    Registered User
    Join Date
    02-09-2013
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    31

    How to get a pop-up tip when the user hovers the mouse over a command and option button

    I am doing a voluntary project for work to make the scheduling go electronic on Excel. I have several forms, where the user would be able to enter certain information about each shift and it would populate it into a comment in the appropriate cell. Anyways, I would like the user to get helpful tips in the form of a text box when he/she hovers the mouse over a command button, option button, check box, etc. on all the forms I have. I know this is where I need to start:

    Please Login or Register  to view this content.
    I would like the text box that appears to look something like this:



    Trade
    Allows you to add mandatory comments/information when a change
    is being made to a shift due to a trade request by an employee. It
    maybe a trade between two or three people.



    I would like the font to be Arial and font size to be 8. I am completely new to Excel VBA. Someone was helping me out from Yahoo Answers. He did pretty much everything and I followed his pattern of codes to make changes and add additional things. He is now busy with his own work and won't be able to help. So, I hope someone here can help me out. Thanks!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to get a pop-up tip when the user hovers the mouse over a command and option butto

    You should be able to get this effect by using the INSERT > COMMENT on those cells on your workbook.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: How to get a pop-up tip when the user hovers the mouse over a command and option butto

    Hello Shanthan,

    Welcome to the Forum.

    And for a Message to appear when you hover over a control, you can complete your code with something like;

    Please Login or Register  to view this content.
    Hope that helps.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

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

    Re: How to get a pop-up tip when the user hovers the mouse over a command and option butto

    if you are talking about userforms then the controls have a controltiptext property that you can assign your own text to
    Josie

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

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: How to get a pop-up tip when the user hovers the mouse over a command and option butto

    @ JosephP,

    Yes you are correct, but I found that if it is a long string, it stretches across the sheet in one horizontal line, "miles" long.

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

    Re: How to get a pop-up tip when the user hovers the mouse over a command and option butto

    if it's a long string it's not appropriate for a tooltip-it should be in an instruction label or manual ;-)

    popping up a message box that you have to dismiss every time the mouse goes over a control is a good way to make sure users won't use your application!

  7. #7
    Registered User
    Join Date
    01-14-2013
    Location
    Louisiana
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: How to get a pop-up tip when the user hovers the mouse over a command and option butto

    Quote Originally Posted by Winon View Post
    @ JosephP,

    Yes you are correct, but I found that if it is a long string, it stretches across the sheet in one horizontal line, "miles" long.
    What if you create a label and use the caption as a tool tip

    the code would then be:

    Please Login or Register  to view this content.
    Hopefully this is a good workaround. I have also attached a workbook.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    02-09-2013
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    31

    Re: How to get a pop-up tip when the user hovers the mouse over a command and option butto

    JosephP,

    I used tried using that feature, but like Winon says below, it appears in one single line and I cannot format it in anyway.

  9. #9
    Registered User
    Join Date
    02-09-2013
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    31

    Re: How to get a pop-up tip when the user hovers the mouse over a command and option butto

    Quote Originally Posted by jleonard5106 View Post
    What if you create a label and use the caption as a tool tip

    the code would then be:

    Please Login or Register  to view this content.
    Hopefully this is a good workaround. I have also attached a workbook.
    Thanks jleonard5106. This doesn't seem to work for me. I changed CmdTrade in your code to optTrade, which is the option button that want to hover over and get the tip, but it doesn't work. Anyways, I was hoping for an effect similar to what happens in Microsoft Word when you hover over the buttons in the ribbon. I don't know how they do it, but maybe I can make create my tip into an image and get it to pop-up. What do you think?

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

    Re: How to get a pop-up tip when the user hovers the mouse over a command and option butto

    you might add a small help button alongside each control that pops up a second form with relevant information

  11. #11
    Registered User
    Join Date
    02-09-2013
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    31

    Re: How to get a pop-up tip when the user hovers the mouse over a command and option butto

    Quote Originally Posted by JosephP View Post
    you might add a small help button alongside each control that pops up a second form with relevant information
    That is a great idea too! The hover-over effect seems elegant. But, if I can't get it to work, then I'll do a help button like you said that bring up second form with all the tips. I can have one help button for each form I have. Thanks!

  12. #12
    Registered User
    Join Date
    01-14-2013
    Location
    Louisiana
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: How to get a pop-up tip when the user hovers the mouse over a command and option butto

    Quote Originally Posted by Shanthan View Post
    Thanks jleonard5106. This doesn't seem to work for me. I changed CmdTrade in your code to optTrade, which is the option button that want to hover over and get the tip, but it doesn't work. Anyways, I was hoping for an effect similar to what happens in Microsoft Word when you hover over the buttons in the ribbon. I don't know how they do it, but maybe I can make create my tip into an image and get it to pop-up. What do you think?
    I think i got it this time.

    2 labels and a frame. When the mouse moves over OptTrade the frame becomes visible. When the mouse moves over the userform OptTrade is not visible.

    This is as close as I can get. I attached a file hope it helps.
    Attached Files Attached Files

  13. #13
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: How to get a pop-up tip when the user hovers the mouse over a command and option butto

    Hi JP,

    you might add a small help button alongside each control that pops up a second form with relevant information
    That too will have the same effect as you have commented:

    popping up a message box that you have to dismiss every time the mouse goes over a control is a good way to make sure users won't use your application!
    One would have to dismiss the second Form as you would have to do with a message box, or am I missing something here?

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

    Re: How to get a pop-up tip when the user hovers the mouse over a command and option butto

    you are missing something :-)

    I was suggesting a button you click if you want help not a message that pops up every time you merely mouse over anything

  15. #15
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: How to get a pop-up tip when the user hovers the mouse over a command and option butto

    Hi JP,

    Oops! Yeah, you are right, once again!

  16. #16
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: How to get a pop-up tip when the user hovers the mouse over a command and option butto

    @ jleonard5106,

    Nice work, but I would replace your Option Button with a CheckBox instead, and have the Userform displayed as not Modal.

    See the revised attached WorkBook.
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    02-09-2013
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    31

    Re: How to get a pop-up tip when the user hovers the mouse over a command and option butto

    Quote Originally Posted by jleonard5106 View Post
    I think i got it this time.

    2 labels and a frame. When the mouse moves over OptTrade the frame becomes visible. When the mouse moves over the userform OptTrade is not visible.

    This is as close as I can get. I attached a file hope it helps.
    Wow, that works! Thanks jleonard5106. This is going to be a problem though when I have a lot of things on which I need to show tips. In those situations, I'll use Joseph's idea.

    Is there a way delay the apparence of the tip box by about 2 seconds? Once I move away, then it should disappear right away. I don't want the user to be distracted by the tip box if they don't need to see it.

  18. #18
    Registered User
    Join Date
    01-14-2013
    Location
    Louisiana
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: How to get a pop-up tip when the user hovers the mouse over a command and option butto

    Sorry for the Delay, See attached file.

    Changes Made.
    • Delay between the frame and labels. Replaced the frame with a new label "LabTrade".
    • Created Userform Initialize to set the labels to .visible = false
    • Created Timer Sub
    • Added Comments.
    Attached Files Attached Files

  19. #19
    Registered User
    Join Date
    02-09-2013
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    31

    Re: How to get a pop-up tip when the user hovers the mouse over a command and option butto

    Quote Originally Posted by jleonard5106 View Post
    Sorry for the Delay, See attached file.

    Changes Made.
    • Delay between the frame and labels. Replaced the frame with a new label "LabTrade".
    • Created Userform Initialize to set the labels to .visible = false
    • Created Timer Sub
    • Added Comments.
    Thank you, jleonard5106, Winon and JosephP and everyone who helped me with this problem. The final version that jleonard5106 is exactly what I wanted. I'll be using the single help-button idea to bring up another userform as well. Thank you all for your hardwork and input. Keep up the good work! I still have several little things to complete my project. I'll be requesting your help in other threads. lol Thank you again!

  20. #20
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to get a pop-up tip when the user hovers the mouse over a command and option butto

    If that takes care of your original query, please select Thread Tools from the menu above and mark the thread as solved. Thanks.

+ 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