I will not suggest using .chm files for Help, as frankly, they are difficult and a pain to set up. However, if the
purpose is to give textual help, AND the text is relatively small, there is another possibility.
For example:
A label with text above a textbox.
(label) Client Preference - Click here for Help
(textbox)
Code:
Sub label_Click()
Msgbox "Use yadda yadda to blah blah blah."
End Sub
As all input controls (textboxes, checkboxes etc.) should have a label - a general rule for useability - you can add small text "Help" to clicking the
label.
It is not a be-all, end-all, solution, but it is a viable low level solution.
Depending on the structure/design, you can also have a generic Label that fills with appropriate text. Something like:
Code:
Private Sub TextBox1_Enter()
Call FillLabel
End Sub
Private Sub TextBox2_Enter()
Call FillLabel
End Sub
Private Sub TextBox3_Enter()
Call FillLabel
End Sub
Private Sub TextBox4_Enter()
Call FillLabel
End Sub
Sub FillLabel()
Select Case ActiveControl.Name
Case "TextBox1"
lblHelp.Caption = _
"text for textbox1 help...."
Case "TextBox2"
lblHelp.Caption = _
"text for textbox2 help...."
Case "TextBox3"
lblHelp.Caption = _
"text for textbox3 help...."
Case "TextBox4"
lblHelp.Caption = _
"text for textbox4 help...."
End Select
End Sub
A label (lblHelp) beside the texboxes (in this example there are four). As the user enters each textbox, the Label text is changed to display help text for THAT textbox.
Again, not a be-all solution by any means, but it can be useful in some circumstances. If the Help text is relatively small - we are not talking about pages and pages of hyperlinked content! - then having the content as text ( strings) within the userform module is quite reasonable.
You could also do the help content as constants, and dump those into the Help label as appropriate, like this:
Code:
Const T1_Help As String = "Yadda yadda, some text for" _
& " Help on Textbox1"
Const T2_Help As String = "Blah blah ho hum, do you" _
& " really need to know this about textbox2?"
Const T3_Help As String = "I am SO tired of you " & _
"asking about Textbox3. Have you not figured " & _
"this out yet?"
Const T4_Help As String = " Ho hum...textbox4..." _
& "AGAIN?????"
Private Sub TextBox1_Enter()
lblHelp.Caption = T1_Help
End Sub
Private Sub TextBox2_Enter()
lblHelp.Caption = T2_Help
End Sub
Private Sub TextBox3_Enter()
lblHelp.Caption = T3_Help
End Sub
Private Sub TextBox4_Enter()
lblHelp.Caption = T4_Help
End Sub
Again, the "Help" label content changes to where the user has focus.
faq219-2884
Gerry
My paintings and sculpture