Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Praha
    Posts
    990
    Thanks
    56
    Thanked 105 Times in 90 Posts

    How to set tip in text box in Excel

    Is it possible to set a Control Tip for a Text Box in Excel 2003 ?

    I thought I could use the ControlTipText property but get:

    Run-time error 438: Object doesn't support this property or method.

  2. #2
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,827
    Thanks
    136
    Thanked 482 Times in 459 Posts
    Hi Martin

    There are a few ways to do this.
    If you use an ActiveX textbox (from the Controls) rather than from the Forms controls, then you can use the mousemove event etc etc.

    zeddy

  3. The Following User Says Thank You to zeddy For This Useful Post:

    MartinM (2015-05-08)

  4. #3
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,436
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Martin,

    The Control Tip property works in 2010 .xlsm file and also when saved as 2003 .xls file in compatibility mode.
    ctrltipproperty.JPG

    If it is present in 2003 there must be another reason for the error than it not being supported.

    Here's my test file in .xls format.: ControlTipExample.xls

    HTH
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  5. #4
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,638
    Thanks
    115
    Thanked 650 Times in 592 Posts
    If you are using an active x textbox on a worksheet, you can place a comment in the cell behind the textbox. The comment will appear when the mouse hovers over it.

    HTH,
    Maud

    control Tip.png
    Last edited by Maudibe; 2015-05-09 at 07:34.

  6. #5
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Praha
    Posts
    990
    Thanks
    56
    Thanked 105 Times in 90 Posts
    RG: thank you.
    Maybe I have explained this badly - it's the Command Button (the one captioned Press to display form) that I want to show the Control Tip.

    Maud: thank you too !
    I was toying with the idea of a comment but hadn't experimented with it combined with an ActiveX textbox. I'll have a play with that.
    OK, this is the first time I've used an ActiveX textbox so be gentle with me !
    I've created one - it behaves as I would expect when in design mode but in user mode nothing happens when I hover over it (with a commented cell underneath) and if I click on the textbox it goes straight into edit mode . . . what am I doing wrong ?

    What I am trying to achieve here is a little help/advice for the user before pressing a button - or a textbox with an assigned macro.
    Last edited by MartinM; 2015-05-09 at 07:24.

  7. #6
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,638
    Thanks
    115
    Thanked 650 Times in 592 Posts
    Martin,

    You can have a cell comment behind a form button as well

    ctrl tip.png
    Last edited by Maudibe; 2015-05-09 at 07:35.

  8. #7
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,638
    Thanks
    115
    Thanked 650 Times in 592 Posts
    Martin,

    Apparently out of design mode for an active X control the comment will no longer appear. But it will work always for a form control.

  9. #8
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,827
    Thanks
    136
    Thanked 482 Times in 459 Posts
    Hi Martin

    see attached file for example of displaying a 'help tip' when moving a mouse over a macro button.

    In this example file, I added an ActiveX command button.
    I named the button as 'button1' using the 'name' box (to the left of the formula bar)
    I added sheet code for the mouseover event.

    I also added two 'form' buttons to allow you to manually display the 'help' shape (to allow you to edit the required help text)
    Have a play with this and see if it does what you want.

    zeddy
    Attached Files Attached Files

  10. The Following User Says Thank You to zeddy For This Useful Post:

    doorjam1 (2015-05-14)

  11. #9
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,827
    Thanks
    136
    Thanked 482 Times in 459 Posts
    Hi Martin

    ..here's another method, using hyperlink assigned to a 'green triangle'

    This one is in Excel2003 file format

    zeddy
    Attached Files Attached Files

  12. #10
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Praha
    Posts
    990
    Thanks
    56
    Thanked 105 Times in 90 Posts
    Hi Z,

    I couldn't convert the .xlsm file but the hyperlink example works, thanks.

    I'm working on how I can adapt this to my requirement . . . . when I create a hyperlink to a shape (so that I can add a screen tip), I have to put in an address - to which I get sent if I happen to click on the shape.

    Why doesn't this happen in your example ? I know I'll kick myself when (if) you tell me

    OR . . . can the hyperlink target address be a Macro ??? If so how would I reference it ?

    I see the target can be a Defined Name, so I wonder if I can slip some code in there perhaps ?

    So many questions . . .
    Last edited by MartinM; 2015-05-09 at 10:16.

  13. #11
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,827
    Thanks
    136
    Thanked 482 Times in 459 Posts
    Hi Martin

    Lets start by getting the code from the .xlsm version working with your Excel2003.
    First off, I couldn't create this in Excel2003 because I have an ongoing problem with my Excel2003.
    I am unable to add any ActiveX controls to a worksheet in Excel2003.

    open this attached Excel2003 file.

    Lets assume that you can add an ActiveX command button to a worksheet.
    If you can, then:
    1. add an ActiveX command button to the sheet
    2. name the command button as 'button1' using the name box (to left of formula bar)

    Edit the help text in shape1 to suit your needs.
    Then hide it, using the [hide] button

    Then move your mouse over the command button you added.

    zeddy
    Attached Files Attached Files

  14. #12
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,827
    Thanks
    136
    Thanked 482 Times in 459 Posts
    Hi Martin

    For the hyperlink version, I used a cell address for the hyperlink address.
    I then added the screen tip text.
    I then deleted the cell address in the hyperlink.

    zeddy

  15. #13
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Praha
    Posts
    990
    Thanks
    56
    Thanked 105 Times in 90 Posts
    Hmmm - if I delete the hyperlink address and close the dialog - it just stays what it was . . . working on this though.

  16. #14
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,827
    Thanks
    136
    Thanked 482 Times in 459 Posts
    Hi Martin

    ..don't forget to try post#11

    Now, in this attached Excel2003 file, I set the hyperlink to move to cell [K1]
    Then I use the Worksheet_SelectionChange event to test for this cell address, and if so, run the specified macro.

    Does that help?

    zeddy
    Attached Files Attached Files

  17. #15
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Praha
    Posts
    990
    Thanks
    56
    Thanked 105 Times in 90 Posts
    Thanks Zeddy,

    I've got there - thanks for sticking with this.

    A curious thing I came across - launching the code by clicking on the shape didn't work the second time !

    Strictly, it doesn't work if the target cell of the hyperlink is already selected - presumably because in that case there is no change.

    I've worked around this, somewhat crudely, in the attached.

    The triggers for change events in Excel have always led me astray one way or another, so this one is consistent I suppose.

    PS I now have to be careful about clicking in K1
    Attached Files Attached Files
    Last edited by MartinM; 2015-05-09 at 13:19.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •