Solved

invoking cutomized help in Excel/VBA

Posted on 2000-03-13
3
1,095 Views
Last Modified: 2012-06-27
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
0
Comment
Question by:borghard
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 9

Expert Comment

by:antrat
ID: 2614279
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
0
 
LVL 5

Accepted Solution

by:
vboukhar earned 71 total points
ID: 2614885
I guess, you can call Application.Help method with name of your custom .Hlp file and topic ID - look at VBA help for details:

expression.Help(HelpFile, HelpContextID)

expression   Required. An expression that returns an Application object.

helpFile   Optional Variant. The name of the online Help file you want to display. If this argument isn't specified, Microsoft Excel Help is used.

helpContextID   Optional Variant. Specifies the context ID number for the Help topic. If this argument isn't specified, the Help Topics dialog box is displayed.
.....

hope it helps
0
 

Author Comment

by:borghard
ID: 2616168
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
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question