Help Context IDs for Excel 2000-2007
Ron de Bruin (last update 26-Aug-2007)
Go back to the Excel tips page

Help Context IDs

This information was previously published on John Walkenbach’s site.

Excel's help is very useful. If you're developing an application that will be used by others,
you may want to make it easy for the user to display a particular help topic from one of Excel's help files.
You can use Application.Help or Application.Assistance.ShowHelp in Excel 2007 to display any help
topic in any help file. But in order to use the Help method, you must know the context ID of the help topic.


Using the Help Context IDs


Excel 2000-2003

In Excel 2000-2003 the context ID's are numbers and it is not so easy to find the numbers.
You can find the numbers in the two workbooks that you can download on this page.
We use Application.Help to display a help topic in Excel 2000-2003.

Note: Application.Help is also working in Excel 2007 for most of the the 2000-2003 ID numbers
 
For example, if you'd like to display the help topic that show the Date/Time Functions List,
you'll find that the context ID for that particular topic is 5199659.

The following VBA procedure displays that help topic.
Sub Example_Show_Help()
    Dim IDNum As Long

    'Fill in the Help ID number
    IDNum = 5199659

    'If the Excel version is 2000, 2002  or 2003
    If Val(Application.Version) > 8 And Val(Application.Version) < 12 Then
        Application.Help "XLMAIN" & Val(Application.Version) & ".CHM", IDNum
    End If

    'If the Excel version is 12 (Excel 2007)
    'Application.Help is also working in Excel 2007
    If Val(Application.Version) = 12 Then
        Application.Help "XLMAIN11.CHM", IDNum
    End If

End Sub

Download two files with the help ID numbers

(1) Shows context IDs for all Excel functions (2000-2007)   With the New functions in Excel 2007
There are two sheets in this workbook, one with all Functions in 2000-2007 and one with only
the new functions in Excel 2007.

(2) Shows all context IDs for Excel 2000, 2002, and 2003
There is a separate tab in this workbook for each Excel version


Excel 2007

In Excel 2007 it is very easy to find the Topic ID.
If you right click on a help page you can copy the ID to the clipboard with one click.
For example you see this when you right click on the "Excel shortcut and function keys" page.




We can paste the ID then in this code line.
Application.Assistance.ShowHelp "HP10073848", ""
Sub Example_Show_2007_Help()
    If Val(Application.Version) = 12 Then
        Application.Assistance.ShowHelp "HP10073848", ""
    End If
End Sub

You see that Application.Assistance.ShowHelp is new in Excel 2007 but
you can also use Application.Help for a lot of topics.

For example : Help for the Counta worksheet function
You can use 60395 with Application.Help (you can find that number in the workbook you
can download) and HP10062393 with Application.Assistance.ShowHelp




More Information about the Excel Functions


Norman Harker's  Excel functions workbook

Excel Functions -- a zipped Excel workbook that contains:
-- All Functions Sheet with Name, Source, Description, Syntax
-- Classified functions Sheets with Name, Source, Description, Syntax and separate listing
of all arguments with descriptions for that classification.


See this webpage for more information
http://www.contextures.com/functions.html



Excel Function Dictionary

Download this great file with a lot of examples from Peter Noneley.
http://www.xlfdic.com