Tooltips

k209310

Active Member
Joined
Aug 12, 2002
Messages
382
does anybody know how to add a tool tip to a command button?

I have added a MouseMove function call and thought all you had to do was add 'ToolTip("CAPTION")'.

However i am given the error message of tooltip not being recognised. am i going about this the right way? Do i need to add a reference? if so does anybody know which one?

Thanks for any help
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

k209310

Active Member
Joined
Aug 12, 2002
Messages
382
I have tried using tooltips whcih gives the fuction not defined message. (I think this needs a freference if it is correct)

ToolTipsText doesnt give an error message but it doent work properly whcih suggests im doing somthing wrong. I have used the following code...

Private Sub CommandButton1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
ToolTips ("ffff")
End Sub
 

Von Pookie

MrExcel MVP
Joined
Feb 17, 2002
Messages
13,686
To be honest, I found ToolTipText command by searching for ToolTip in the VBE Help file.

Copied from the help file:

TooltipText Property

Returns or sets the text displayed in a command bar control's ScreenTip. Read/write String.

Remarks
By default, the value of the Caption property is used as the ScreenTip.

Example
This example adds a ScreenTip to the last control on the active menu bar.<PRE>Set myMenuBar = CommandBars.ActiveMenuBar
Set lastCtrl = myMenuBar _
.Controls(myMenuBar.Controls.Count)
lastCtrl.BeginGroup = True
lastCtrl.TooltipText = "Click for help on UI feature"</PRE>

_________________<font color="#3399FF" size="3">Kristy</font>
kitten_smush2.jpg

This message was edited by Von Pookie on 2002-10-22 10:35
 

Forum statistics

Threads
1,143,640
Messages
5,719,987
Members
422,256
Latest member
downeybm

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top