We help IT Professionals succeed at work.

Activate help

habibb
habibb asked
on
dear experts
I want to activate help on the click event of a button.
Although I have activated it by pressing F1.
for example I am using the following code:

Private Sub Command1_Click()
    App.HelpFile = "GREENS.HLP"
    Command1.HelpContextID = 4
End Sub

But it is not activating on click event but on pressing F1 key.

Any body can tell me simple code but not too much heavy code.

Thanks
Comment
Watch Question

Commented:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = 112 Then 'F1
    App.HelpFile = "GREENS.HLP"
    Command1.HelpContextID = 4
  End If
End Sub

Commented:
Experts,
   Good luck trying to get habib to award you points.  Review his question history.  You'll find he's left many experts hanging.

Habib,
   Why do you continue to ask questions if you have no intentions of displaying a morsel of grattitude for their time and effort?

CArnold
Unresponsive to follow up requests, therefore this has been finalized by
Moondancer
Community Support Moderator @ Experts Exchange

Explore More ContentExplore courses, solutions, and other research materials related to this topic.