Document
Documentation has evolved over the last several years to the point where most Help is provided over the Internet. That makes updating content easier, allows feedback, and probably most importantly maintains contact with customers.
You can create HTML documentation for your application using Word, FrontPage, or another editing tool—I wind up using Notepad more than I’d expect. HTML documents can be posted to a web server or they can be copied to the user’s machine along with the application.
Then, you simply link items to help
pages using hyperlinks on the worksheets or by using the Application.Help
or Workbook.FollowHyperlink
method in code:
Sub TestShowHelp( ) Dim result As VbMsgBoxResult result = MsgBox("An error occured. Click OK to show help.", _ vbOKCancel, "Error") If result = vbOK Then ' Display Help in Help window. Application.Help ("http://excelworkshop.com/Help/error51.htm") ' Alternate approach: display Help in browser. 'ThisWorkbook.FollowHyperlink _ ' ("http://excelworkshop.com/Help/error51.htm") End If End Sub
The Help
method displays the page in Excel’s Help window. The FollowHyperlink
method displays the page in the browser. Using the browser provides better navigation tools, but the Help window shares the screen with Excel a little better.
You can also add links to Help from menu items in Excel. To do so:
Choose Tools → Customize → Commands and select the Window and Help category.
Drag Contact Us from the Commands list to the Help menu as shown in ...
Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.