Consulting

Results 1 to 7 of 7

Thread: Help Help

  1. #1
    Administrator
    Chat VP
    VBAX Guru johnske's Avatar
    Joined
    Jul 2004
    Location
    Townsville, Australia
    Posts
    2,872
    Location

    Question Help Help

    Hi everybody,

    Can someone pls tell me how to create a custom Help file and (say) assign it to the "?" button on an input box?... (I've been generally sidestepping this issue by usually having a help button to show a userform but this neglects the issue and is not much use on an input box)

    much TIA
    John

  2. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    You need to create the help file with special software designed to make help files. Most of these programs you have to buy, but I have found one that is free (the one I use obviously ). You can download it here.

    http://www.danish-shareware.dk/soft/shelpm/

    Create the help file then in the VBE goto Tools | VBAProject Properties and assign the help file to the project.

  3. #3
    Administrator
    Chat VP VBAX Guru johnske's Avatar
    Joined
    Jul 2004
    Location
    Townsville, Australia
    Posts
    2,872
    Location
    COOL!!

    Thanx Jacob, will download it and look at this. I didn't know you needed a tool, I thort it was just because (as usual) I was too stupid to work it out....

    John

    I also have another problem on a totally different topic, so will post as a new question in a few mins...

  4. #4
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    You're Welcome

    If you need any help using the program let me know.

  5. #5
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Great question John!
    Jacob,
    I downloaded the helpfilemaker program you suggested and am able to use it on a userform if they click F1. I just have a couple of questions?
    Could you give a little insight into how to call the helpfile from a button on a userform(if possible).

    Also after assigning the path and ContextID, I was wondering if the help file has to accompany the excel file if it is sent out...if so can the path be relative to the excel file?

    By the way, Thanks Jacob. Thanks to you and the others here at VBAExpress my apps are looking like someone besides me had been working on them(a professional for example)


    Edit: I found that you can put the help file in the same directory and move them together if you call it from the form like this:


    Private Sub CommandButton2_Click()
    Application.Help "helpfile1.hlp", 1
    End Sub
    Last edited by lucas; 10-03-2004 at 08:20 PM. Reason: I did a little reading....
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  6. #6
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    You can set the help context ID for a command button and then when a user presses the question mark on the user form then the command button they would get the help text.

    If you want to just open the entire help file from a button try this:


    Option Explicit
    
    Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( _
    ByVal hWnd As Long, _
    ByVal lpOperation As String, _
    ByVal lpFile As String, _
    ByVal lpParameters As String, _
    ByVal lpDirectory As String, _
    ByVal nShowCmd As Long) As Long
    
    Sub OpenAnyFile()
    Dim FilePath        As String
    Dim FileName        As String
    Dim FileToOpen      As String
    FilePath = ThisWorkbook.Path
        FileName = "FileName.hlp"
        FileToOpen = FilePath & "\" & FileName
    Call ShellExecute(0, "Open", FileToOpen & vbNullString, vbNullString, vbNullString, 1)
    End Sub

  7. #7
    Site Admin
    The Princess VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location
    Added that link to the bottom of www.vbaexpress.com/resources.htm
    ~Anne Troy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •