PDA

View Full Version : calling a help file from userform...



irisbu
09-02-2007, 10:31 AM
I have created a user form and I need to call a help file from one of its buttons... I don't really know how to do this and all my efforts have failed... if you can help me... it will be great!!!
this is the code of the userform:

Private Sub CommandButton1_Click()
With Selection
.Font.Name = "Times New Roman"
.Font.NameBi = "Arial"
End With
Selection.Find.Execute Replace:=wdReplaceAll
Unload UserForm4
End Sub


Private Sub CommandButton2_Click()
Unload UserForm4
End Sub


Private Sub CommandButton3_Click()
Dim help1 As Integer
help1 = ("D:\lib1\Viewhlp.chm")
End Sub


thank you!

Oorang
09-07-2007, 06:24 AM
If you are just trying to launch the file and not trying to go to a specific page in the file, use: VBA.Shell "D:\lib1\Viewhlp.chm", vbNormalFocus