Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

invoking cutomized help in Excel/VBA

Posted on 2000-03-13
3
Medium Priority
?
1,113 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
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 284 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

Cancel future meetings from user mailboxes in Office 365 using Remove-CalendarEvents
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

971 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