Total Visual SourceBook

Total Visual SourceBook CD and Printed Manual

Microsoft Access/ Office 2016, 2013, 2010, and 2007 Version
is Shipping!

New features in Total Visual SourceBook for Access, Office 2007 and VB6

Supports Access/Office 2016, 2013, 2010 and 2007, and Visual Basic 6.0!

Separate version for Access/Office 2003, 2002, and 2000.

Separate version for:
Access 97/95


View all FMS products for Microsoft AccessAll Our Microsoft Access Products

SourceBook Info:

Why SourceBook?

 

"The code is exactly how I would like to write code and the algorithms used are very efficient and well-documented."

Van T. Dinh, Microsoft MVP

 

 

 

Microsoft Access, Office/VBA, VB6 Modules royalty-free source code libraryMicrosoft Access Modules royalty-free source code libraryMicrosoft Access VBA and VB6 Module Library Free trial of Total Visual SourceBook for Microsoft Access, Office, VB6 and VBA

Module: HelpHTML in Category Windows : Help Files from Total Visual SourceBook

Working with Windows HTML Help files (usually named *.CHM or *.HTML) in VB6 and VBA with 32 and 64 bit Windows API calls.

Microsoft Access forms have a HelpFile property that supports legacy *.HLP format files, but not the newer *.CHM help file format.

Procedure List

Procedure Name

Type

Description

(Declarations) Declarations Declarations and private variables for the modHelpHTML module
Help_HTML Procedure Open an HTML/CHM help file for a particular ID
Help_HTML_Index Procedure Open an HTML/CHM help file on the Index tab
Help_HTML_Contents Procedure Open an HTML/CHM help file on the first item displaying the treeview list of contents
Help_HTML_Search Procedure Open an HTML/CHM help file on the search tab. Due to a Microsoft bug, it's not possible to execute a search string.
Help_HTML_Topic Procedure Call the Windows help API to launch an application's help file in CHM format for a particular topic name
Help_HTML_CloseAll Procedure Close all help files opened by this application

Example Code for Using Module: HelpHTML

' Example of modHelpHTML
'
' To use this example:
' 1. Create a new form
' 2. Create the following command buttons:
'       'cmdOpen'
'       'cmdClose'
' 3. Create a combo box named 'cboOpenTo'
' 4. Create the following text boxes:
'       'txtFile'
'       'txtContextID'
'       'txtTopic'
' 4. Paste the entire contents of this module into the new form's module.

Private Sub cmdClose_Click()
  Help_HTML_CloseAll
End Sub

Private Sub cmdOpen_Click()
  ' Constant to control whether the help file is maximized when opened.
  Const cfMax As Boolean = False

  Select Case Me.cboOpenTo
    Case "ContextID"
      Help_HTML Me.txtFile, Me.txtContextID, cfMax
    Case "Contents"
      Help_HTML_Contents Me.txtFile, cfMax
    Case "Index"
      Help_HTML_Index Me.txtFile, cfMax
    Case "Search"
      Help_HTML_Search Me.txtFile, cfMax
    Case "Topic"
      Help_HTML_Topic Me.txtFile, Me.txtTopic, cfMax
  End Select
End Sub

Private Sub Form_Load()
  ' Constants to use as defaults
  Const cstrHelpFile As String = "TVSB.chm"
  Const cstrTopic As String = "Example_Code"
  Const clngID As Long = 32

  ' Provide full path to help file. Uses Access command for the current database's path.
  Me.txtFile = CurrentProject.Path & "\" & cstrHelpFile

  Me.txtContextID.Format = "#"
  Me.txtContextID = clngID
  Me.txtTopic = cstrTopic

  ' Captions on buttons
  Me.cmdClose.Caption = "Close All"
  Me.cmdOpen.Caption = "Open Help"

  With cboOpenTo
    .RowSourceType = "Value List"
    .RowSource = "ContextID;Contents;Index;Search;Topic"
    .LimitToList = True
    .Value = "ContextID"
  End With
End Sub

Microsoft Access Module LibraryOverview of Total Visual SourceBook

The source code in Total Visual SourceBook includes modules and classes for Microsoft Access, Visual Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily add this professionally written, tested, and documented royalty-free code into your applications to simplify your application development efforts.

Additional Resources