Solved

invoking cutomized help in Excel/VBA

Posted on 2000-03-13
3
1,071 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
3 Comments
 
LVL 9

Expert Comment

by:antrat
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now