mortgageman
Well-known Member
- Joined
- Jun 30, 2005
- Messages
- 2,015
Is there a general way (or any way) to add a help file to a user form?
Gene, "The Mortgage Man", Klein
Gene, "The Mortgage Man", Klein
Private Sub CommandButton1_Click()
Dim myText As Variant
Close #1
Open "c:\HelpFile.txt" For Input As #1
While Not EOF(1)
Input #1, newText
myText = myText & newText & vbCr
Wend
Close #1
TextBox1.Text = myText
End Sub
How about adding a ToolTip for each control? Would that do it?
You could pop up another UserForm as the help screen and put the contents of the help file into a textbox on that form.
Make the Textbox multiline, wordwrap
code:
Private Sub CommandButton1_Click()
Dim myText As Variant
Close #1
Open "c:\HelpFile.txt" For Input As #1
While Not EOF(1)
Input #1, newText
myText = myText & newText & vbCr
Wend
Close #1
TextBox1.Text = myText
End Sub
mortgageman said:How about adding a ToolTip for each control? Would that do it?
It sounds good. What is it?
Gene, "The Mortgage Man", Klein
If you open the VBA Help, enter tooltip, and choose "What is a ToolTip? (Forms)" from the topics. Read all about it. Very neat, easy feature to implement. Not really a helpfile, but, as the name suggests, just tips on what to do ("Enter last name, then first name separated by a comma." Stuff like that.)