ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Linking a Ribbon control with an help file (https://www.excelbanter.com/excel-programming/399264-linking-ribbon-control-help-file.html)

Ahasverus

Linking a Ribbon control with an help file
 

Hello,

When the mouse hovers over a built-in Ribbon control, you can press F1 to show
the help topic related to it.

Is it possible to achieve the same with a custom Ribbon control, and how ?

Thanks !

Jim Rech

Linking a Ribbon control with an help file
 
As far as I know it is not possible because we have no way to know which
control the cursor is hovering over when F1 is pressed.

--
Jim
"Ahasverus" wrote in message
...

Hello,

When the mouse hovers over a built-in Ribbon control, you can press F1 to
show the help topic related to it.

Is it possible to achieve the same with a custom Ribbon control, and how ?

Thanks !




Ahasverus

Linking a Ribbon control with an help file
 

Thanks for the answer, Jim.

Obviously, there are much improvements to do with the new interface.

Jim Rech a écrit :
As far as I know it is not possible because we have no way to know which
control the cursor is hovering over when F1 is pressed.


Chip Pearson

Linking a Ribbon control with an help file
 
One work-around that you might be interested in is to test the state of
SHIFT key when the button is clicked. In the code assigned to that control
you could use

Sub Whatever()
If IsShiftKeyDown = True Then
''''''''''''''''''''''''''''''''''
' display help
''''''''''''''''''''''''''''''''''
Exit Sub
End If
''''''''''''''''''''''''''''''''''
' normal macro behavior
''''''''''''''''''''''''''''''''''
End Sub

See http://www.cpearson.com/excel/KeyTest.aspx for info about how to test
the state of the SHIFT key. It isn't as nice as a simple F1, but may be
satisfactory.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"Ahasverus" wrote in message
...

Thanks for the answer, Jim.

Obviously, there are much improvements to do with the new interface.

Jim Rech a écrit :
As far as I know it is not possible because we have no way to know which
control the cursor is hovering over when F1 is pressed.




All times are GMT +1. The time now is 10:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com