Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Custom help attached to CommandButton
Is it possible to attach a custom help file to a CommandButton embedded in an
excel sheet so that when the button takes focus and I press F1, my custom help file pops up? I could not find the HelpContextID property for my command button. Wendy (Excel 2003, WinXP Pro) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Custom help attached to CommandButton
Hi Wendy,
I don't think possible directly, at least not in the same way as in theory possible with a control in a form. You might try something like the following to detect if F1 was pressed while the button was in focus, in the sheet module - Private Sub CommandButton1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) Const cHelpID as long = 1100 ' help constant ID If KeyCode = vbKeyF1 then Call myHTMLhelp(cHelpID) end if End Sub where myHTMLhelp is your routine to call the HTML help API (assuming you are not using WinHelp) Regards, Peter T "Wendy V" wrote in message ... Is it possible to attach a custom help file to a CommandButton embedded in an excel sheet so that when the button takes focus and I press F1, my custom help file pops up? I could not find the HelpContextID property for my command button. Wendy (Excel 2003, WinXP Pro) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can't find Custom Toolbar attached to workbook | Excel Programming | |||
How do I make a commandbutton in Excel 'launch' a custom form? | Excel Programming | |||
How can I update a Attached Custom Toolbar in a shared file? | Excel Worksheet Functions | |||
Accessing Attached XLS file | Excel Worksheet Functions | |||
Attached tool bars | Excel Discussion (Misc queries) |