Link to home
Start Free TrialLog in
Avatar of borghard
borghard

asked on

invoking cutomized help in Excel/VBA

Configuring a Visual Basic project to use a particular Help file allows you to assign a Help topic identification number to a control on a UserForm. When you select the control and press F1, the topic in the Help file appears.

Instead of using F1 key, is there a way I can have the customized help invoked when the user clicks on a customized button or menu item?

Thanks -
BB
Avatar of antrat
antrat

Hi borghard

I believe you could use the WhatsThisHelp  by setting the WhatsThisButton property to true on your user form, sorry I haven't given youi too much in th eawy of an example, but my ISP is about to boot me off the net :(

anyway this is from the help and should get you on your way

Returns a Boolean value that determines whether context-sensitive Help uses the pop-up window provided by Windows 95 Help or the main Help window. Read-only at run time.

Remarks

The settings for the WhatsThisHelp property are:

Setting      Description
True      The application uses one of the What's This access techniques to start Windows Help and load a topic identified by the WhatsThisHelpID property.
False      (Default) The application uses the F1 key to start Windows Help and load the topic identified by the HelpContextID property.
Remarks

There are two access techniques for providing What's This Help in an application. The WhatsThisHelp property must be set to True for any of these techniques to work.

·      Providing a What's This button on the title bar of the UserForm using the WhatsThisButton property. The mouse pointer changes to the What's This state (arrow with question mark). The topic displayed is identified by the WhatsThisHelpID property of the control clicked by the user.
·      Invoking the WhatsThisMode method of a UserForm. This produces the same behavior as clicking the What's This button without using a button. For example, you can invoke this method from a command on a menu in the menu bar of the application.


Good luck

antrat
ASKER CERTIFIED SOLUTION
Avatar of vboukhar
vboukhar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of borghard

ASKER

Thanks!  
I think I was close w trying:
Application.VBE.ActiveVBProject.HelpFile = ...
but couldn't get it to work.

Your suggestion worked like a charm.

BB