+ Reply to Thread
Results 1 to 13 of 13

VBA Application.InputBox Option HelpFile:= HelpContextID:=

  1. #1
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    VBA Application.InputBox Option HelpFile:= HelpContextID:=

    VBA Application.InputBox Option HelpFile:= HelpContextID:=

    Hi,
    . I am trying to learn and practice with the .InputBox just now.
    . I am getting there with most aspects. But I am struggling to find good explanations of, or rather, examples of actually using the two optional arguments Helpfile and HelpContextID
    . Can anyone give me or point me in the direction of a working example / examples using specifically these options, with a brief explanation of what is going on

    Thanks
    Alan
    '_- Google first, like this _ site:ExcelForum.com Gamut
    Use Code Tags: Highlight code; click on the # icon above,
    Post screenshots COPYABLE to a Spredsheet; NOT IMAGES PLEASE
    http://www.excelforum.com/the-water-...ml#post4109080
    https://app.box.com/s/gjpa8mk8ko4vkwcke3ig2w8z2wkfvrtv
    http://excelmatters.com/excel-forums/ ( Scrolll down to bottom )

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: VBA Application.InputBox Option HelpFile:= HelpContextID:=

    Hi Alan,

    I've never used Helpfile and HelpContextId, however,

    the following links seem to indicate how they would be used:
    https://msdn.microsoft.com/en-us/lib.../ff839468.aspx
    http://www.excelguru.ca/content.php?...r-Applications

    Many years ago I built a Help File in Windows 3.1 using C++, and I still have nightmares about the experience.

    Lewis

  3. #3
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: VBA Application.InputBox Option HelpFile:= HelpContextID:=

    Quote Originally Posted by LJMetzger View Post
    .....

    I've never used Helpfile and HelpContextId, however,

    the following links seem to indicate how they would be used:
    https://msdn.microsoft.com/en-us/lib.../ff839468.aspx
    http://www.excelguru.ca/content.php?...r-Applications
    ...
    Hi, thanks for the reply.
    . and thanks for the links:
    . the first one and similar ones I hit on many times. They are OK at getting me the syntax and roughly saying what they do. Nut no concrete working example to see or explain how to actualy go about using those arguments.
    . the second link does not appear at first glance to be particularly related to use with the VBA Application.InputBox..

    .. But it is a long article, I will review it again
    Thanks
    Alan

  4. #4
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: VBA Application.InputBox Option HelpFile:= HelpContextID:=

    It seems like all Helpfiles and HelpContextIds are similar in Usage. The ContextId points seems to point to which part of the HelpFile to Display. The 2nd link shows how to create a HelpFile and this should help you to understand what is inside.

    If a HelpFile and HelpContextId is provided for InputBox, allegedly a HELP button will magically appear according to the first link.

  5. #5
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: VBA Application.InputBox Option HelpFile:= HelpContextID:=

    Quote Originally Posted by LJMetzger View Post
    ...
    If a HelpFile and HelpContextId is provided for InputBox, allegedly a HELP button will magically appear according to the first link.
    @ LJMetzger
    . Thanks again
    . Hmm . I'm still not getting it. I have been happilly puting all other arguments in and seeing what actually happens. And getting thing useful and understandable to happen.
    . But I am still not seeing what to put in those Option HelpFile:= HelpContextID:= arguments to result in something understandabel and useful happening
    Thanks LJMetzger anyway Appreciate the replies
    ..........

    @ Anyone else..

    . Any one got a code example with those Arguments in, such that I can run it and get my teeth into what is actually going on / happening?
    Alan

    :

  6. #6
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: VBA Application.InputBox Option HelpFile:= HelpContextID:=

    Hi, just a quick feedback.. still interested in any help on this one..

    Quote Originally Posted by LJMetzger View Post
    ..
    If a HelpFile and HelpContextId is provided for InputBox, allegedly a HELP button will magically appear according to the first link.
    . I read that as well... and this, which I occaisionally get thrown up at me, tends to suggest the possibility is there at least for VBA “internally” to use

    \1

    http://i1065.photobucket.com/albums/...pszlxyw5vy.jpg
    http://tinyurl.com/oe95yfd


    .. my question still remains ( all be – it as a background low priority interest ) ... is anyone privy to a code that I can run that would actually do something like that shown in the screen shot

  7. #7
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: VBA Application.InputBox Option HelpFile:= HelpContextID:=

    Hi
    Bump on understanding Application.InputBox Basics. ( And a small observation for any German viewers )

    So Question
    _ 1 ) The Main Original: I am still looking for a working code example or examples of actually using the two optional arguments Helpfile:= and HelpContextID:= in VBA Application.InputBox


    _ 2) My new observation. ( was a question until I prepared this Post – saw it was a Microsoft Typo! ) - It arose as i had difficulty getting the Title of the Application box to come up, at least using Named Arguments ( Title:= ) . ( BTW ., before you ask, I prefer to use named arguments as it helps me remember what each argument is doing )

    To elaborate on _2): I understood from Links such as these
    https://msdn.microsoft.com/de-de/lib.../ff839468.aspx

    that i can use named or unnamed arguments.
    _ . Unnamed arguments must be in order, ( and so place holders ( an empty comer and space , ______ ) must be used for any optional arguments not used within the argument list. ( If arguments are missed off the end then the place holders can be omitted )
    _ . Named arguments can be in any order. Here is the list from that Microsoft link ( Actually shown for fun in the order needed for unnamed Arguments )

    Prompt:=
    Titel:=
    Default:=
    Left:=
    Top:=
    HelpFile:=
    HelpContextID:=
    Type:=

    _ . Well – Spot the Typo: Titel:= Should be Title:=
    Attachment 427960



    Alan

  8. #8
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: VBA Application.InputBox Option HelpFile:= HelpContextID:=

    Bump
    ( on getting these optional things, HelpFile:= _ , HelpContextID:= , to do what ever it is they are supposed to )


    Hi
    I am getting clued up on the simpler “Pop up User Info getting / giving Window” stuff currently.
    I would like to consider them all at their full potential for a better comparison.

    So I could do with having an answer to the question that is the main subject of this Thread.
    It is a couple of years along the way now – I had just started with computers back then.
    I think I may have a better chance now of understanding the Link given to me in post #2 https://www.excelguru.ca/content.php...r-Applications
    It is clearly not straight forward so I had no chance back then of having the slightest idea what that was all about. At first glance I think I might at least be able to make a start now…

    I can’t find any other articles or documentation on this, -
    If anyone has any input on this, for example a full working example that they are able to walk me through using, then it could probably save me a lot of time.

    Otherwise I will see you here again, in a couple of weeks probably, … when I have sussed it out myself..

    Thanks
    Alan

    P.s.
    By the way…. I think I will try initially to look at the HelpFile:= _ , HelpContextID:= _ in conjunction with the InputBox Function ( https://msdn.microsoft.com/en-us/vba...utbox-function ) in preference to the Excel Application.InputBox Method ( https://msdn.microsoft.com/en-us/vba...x-method-excel ) because
    _a) I am aware now that the Excel Application.InputBox Method has bugs
    ( The only difference in the working is that the Excel Application.InputBox Method has an extra last optional argument, Type:= . (One “advantage” of this being that for giving Type:=8 will return an object, which will be the range object of the cells either typed in (as an address), or alternatively selected)……I expect this extra complication is what probably screws things up.. )
    _b) I believe the InputBox Function is possibly more fundamental, and I am hoping possibly to further my investigations into a ““more direct API route” with this ( https://www.excelforum.com/excel-pro...rary-list.html ) , although it is not clear currently if there is a “more direct API route” for this yet. )
    I have also learned and partially myself perfected using string references for referring to range objects as an alternative, and this trend I will be perusing and I expect it to become possibly more trendy to do that. ( It certainly makes code a lot ‘prettier )







    Ref
    https://stackoverflow.com/questions/...38078#48338078
    http://www.mrexcel.com/forum/excel-q...ox-method.html
    http://www.vbforums.com/showthread.p...3-but-not-2007


  9. #9
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: VBA Application.InputBox Option HelpFile:= HelpContextID:=

    I am aware now that the Excel Application.InputBox Method has bugs
    You obviously did not drink the Microsoft 'Kool Aid', because its' not a bug, its a feature.

  10. #10
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: VBA Application.InputBox Option HelpFile:= HelpContextID:=

    Quote Originally Posted by LJMetzger View Post
    ...did not drink the Microsoft 'Kool Aid',.... its' not a bug, its a feature.
    Lol.. I really should have thought of that “Feature” idea. I keep trying tell people about the special Forum Software “Features” that excelforum has.
    I guess you only get this free drug https://imgur.com/gallery/GjZgOM1 if you are a professional programmer looking to buy some software. I don’t know why but it reminds me of Cresta ( Its Frothy Man https://www.youtube.com/watch?v=tvo2Hddqg3I ), although as I recall the Cresta that I was hooked on as a Kid was pink in color ). Maybe that has some similar secret hidden ingredient to make you like the providers stuff…

    I will have to battle through and get the things to the stand that I conceive without a drugged up mind ( well not on Microsoft’s drug anyway ) as “working”. …. Well, … after a fashion …. I think maybe I have in this case … at least working enough to make the rational decision not to use it…
    _._____________________

    So.
    This whole help file business looks like a very complicated way to do something very simple. Not surprisingly it seems to go wrong a lot and fixing it when it breaks needs a lot of computer programming knowledge.
    Maybe I should need to word that differently. Hang on, .. __ let me take a quick swig of my Microsoft 'Kool Aid' __ then I will begin.. _...
    If I may, just to avoid confusion. I will use the term “Bugg y feature” to refer to what rational thinking says is a Bug and what when drugged up on Microsoft 'Kool Aid' appears as a neat feature.

    Microsoft Help Text aka “Help” “Feature” and “Buggery features
    Aka , as applied to this Thread..
    What is HelpFile:= HelpContextID:= about

    It is impossible for me ( or anyone I expect ) to guarantee to walk you through a working demo of getting the “Pop up” box optional argument parameters of HelpFile:= HelpContextID:= to do what ever it is that they are supposed to do.
    The reason for this is that the “Buggering Features” are too many and varied.
    Anyway_....Microsoft have a “Help” system, ( Sometimes referred to loosely as “Help” ). Crudely this could be considered as an alternative to writing some explanatory notes in a media such as a text file, or Word document or as in a supplied user manual.
    It has the interesting “feature” that in order to master it and use it you will become, or need to be, at a fairly confident level or programming and general computer knowledge. You may need constant access through the internet to get help and advise onto how to maintain the system , that is to say make it continually work, as changes , such as Microsoft updates, will result on additional things needing to be done as time goes on. One of the major “feature” therefore is its Volatility…. And / or it often does not work
    A useful tip I have learnt when looking for general information on this Microsoft help through the internet is to include extra terms such as “problem” or “not working”. Without these terms it proved almost impossible to get ay information on the Theme, but with those terms, a great deal of information was obtained allowing for possibility of using up many hours of time in the many interesting actions that may likely to be needed in order to make the Help work, and or repair the damage done to many other things in the initial attempts. These include adding and removing security updates, and manipulating registries and the such both manually and with computer programs calling up many API codes.

    Here we go,
    Help text Window Feature and “Buggary features”
    Most things “Help” or of the help nature in Microsoft uses similar looking Windows. When, for example you is in the VB Editor ( Alt+F11 from Excel spreadsheet ) Window looking at code, you can highlight a word in the code, hit F1, and then such a Help Window comes up
    HelpApplicationHelp.JPG : https://imgur.com/ZAXUHmW
    So there could be some thinking behind the “Microsoft Help” as a (bad) attempt to bring it all together in some organised way.
    .chm Files ( getting them to work/open)
    These are the files used as the “raw data” in whatever hidden software takes these files and uses them in some process to get those help windows up. They contain some sort of compressed data of coding written in some variation of the HTML language.
    It is likely you may have some .chm files, as the Microsoft Help Text aka “Help” is likely have been used / integrated into some software that you may have on your computer
    You may find some ( in Vista and Win 7 ) if you click on the bottom left Microsoft sign and then type in _ chm _ in the small search box.
    Here are some also that I made or found earlier https://app.box.com/s/bx2pkvtemsppscz60rd6f430wm89c6fj https://app.box.com/s/varm2k1ojlwwtemnefuhhnym1d84bcxs

    It is impossible for me to guarantee to walk you through a working demo of getting the HelpFile:= HelpContextID:= to do what ever it is that they are supposed to do. One of the “Buggering Features” that may prevent getting a successful use of Help is that security updates from Microsoft may intentionally or unintentionally prevent a .chm file from operating as initially intended.
    Solutions to this problem range from one extreme to the other.
    _ One extreme is major heart surgery to registry files, along with a possible need for application of additional software.
    or
    _ If you are lucky some of the following may be all you need to ensure that a .chm file will work as it should:
    Try out a .chm first( sometimes you need to have done this to make other workarounds work fter you find out that it doesn’t work )
    After finding or downloading such a file, navigate to it in its folder , and make a note of its path and file name. ( In the Microsoft Explorer window you may be able to copy the path to the clipboard
    chmFolderPath.JPG : https://imgur.com/5Si2HIq )
    So for that example shown you need to make a note of the following path and file name ( remember the extra \between the two ) :
    G:\Excel0202015Jan2016\ExcelForum\UserForm\samplehelp.chm _ ‘This is the sort of Help File string that you will need
    Now try either of the following:
    _(i) Double click on the file in the Window Explorer window
    or
    _(ii) Run this code ( change the Help File string to suit what you have as a .chm File )
    Please Login or Register  to view this content.
    As a result of doing either of those a Help Window Thingy may or may not come up. If it does come up, it may give an error , that is to say something in the largest window to the effect of one or more things. Here a couple, with workarounds:

    Buggery Internet Error Feature 1:

    i Navigation to the webpage was canceled.
    __ What you can try:
    __ .- Retype the address.

    Workaround:
    If that error is obtained it may mean that some form of blocking has been done by some sort of security measure. If this has happened an extra option will now be seen towards the bottom of the general settings in the Properties Window which you see by right clicking on the file in the Windows Explorer Window and selecting _ Properties
    chmUnblock.JPG : https://imgur.com/ObMrbOy
    Hit _ Unblock.
    After doing this, the (i) or (ii) should result in a normal looking Help type Window.
    Note:
    _ It may initially be necessary to make the attempt of the (i) or (ii) , or otherwise you may not see the option _ Unblock.
    _ Strangely it is sometimes necessary to have done the above workaround in order to avoid other problems later. So it is sometimes advisable to try and get this Buggery Internet Error Feature. One way to achieve this is to upload and then download the .chm file to a trusted file sharing site such as box.net ( https://account.box.com/signup/n/personal#rw1w0 )

    Buggery Internet Error Feature 2:
    A similar “Internet Error” window may show:
    ThisProgramCanNotDisplayTheWebPage.JPG https://imgur.com/NduujoY
    i This Program Can Not Display The Web Page

    Workaraound: WARNING: Do this at your risk. You are messing with dangerous stuff
    via left bottom Microsoft symbol_ regedit.exe_ HKEY_LOCAL_MACHINE
    regeditHKEY_LOCAL_MACHINE.JPG https://imgur.com/MHAggqH
    _ SOFTWARE --- Microsoft
    SOFTWAREMicrosoft.JPG https://imgur.com/n5TnD1b
    HTML --- 1.x --- right click mouse _ Neu --- Key
    HTMLHelp1_xNewKey.JPG https://imgur.com/z7QnvCV
    Name the new folder that appears as _ ItssRestrictions
    ItssRestrictions.JPG https://imgur.com/nDyE9tL
    right click mouse _ Neu --- DWORD (32-bit) Value
    Name the new folder that appears as _ MaxAllowedZone
    Double click on that to get an edit Window
    EditDWORD32bitValue.JPG https://imgur.com/07AAqu1
    Give a value of _ 4

    Refresh your computer somehow
    (**** Edit: 25Jan 2018: .. another possible Registry modification reported, but have not tried it as have not needed it yet )

    3_ Buggery Features 3
    See next post for another way to get over the “Help” thing usually not working

    _.________________
    Back not to the original Thread question:

    _ Application.InputBox(Prompt:= , Title:= , Default:= , Left:= , Top:=, HelpFile:= , HelpContextID:= , Type:= ) Method
    Coming back to the Theme of this Thread.
    As noted , to avoid the extra complication for now of the “Application.InputBox Buggery features” , I am considering a slightly different thing
    __ InputBox(Prompt:= , Title:= , Default:= , Left:= , Top:=, HelpFile:= , Context:= )
    __( Note the slight syntax difference between Context:= and HelpContextID:= ) Function

    One main part of the Thread question ( what are those two options supposed to do ) can now be [Solved]:
    Two possible ways to “launch” a .chm help file where discussed ( (i) and (ii) )
    A third way (iii) is possible.:- Many of the “Pop up User Info getting / giving Window” stuff have the option to allow a button to “launch such a file” …
    Typically the Options are like
    The main option:
    _ HelpFile:= _________ --- _______ The full path and file name of the .chm file
    A second option:
    _ HelpContextID:= or Context:= _ --- _A number that takes you to a particular part or section of the main text

    _ For InputBox _ it appears the Context:= is not optional.
    _ For Applcation.InputBox and for Application.Help _ it appears that HelpContextID:= is optional. (But it is not too clear with the case of Applcation.InputBox due to the additional “ Application.InputBox Buggery features”)
    _ For InputBox it appears that no Button for help must be specified: it will appear if HelpFile:= and Context:= are given. ( There is no option to add buttons anyway here )
    _ For MsgBox the button option (buttons:=vbMsgBoxHelpButton ) must be given or the Help Button will not appear. ( But if the (buttons:=vbMsgBoxHelpButton is not given and the helpfile:= and context:= are given and valid, then the code line will not error )
    _ For Applcation.InputBox it would appear that one of the “Buggery features” is that no Help Button comes up. ( But then..Nothing to do with the Help seems to work for Excel 2007+ with Applcation.InputBox _ – That is a “feature” of it .. “Bugger me feature


    The next post will attempt to make a .chm file. But will also have to tackle possible further “Buggery features


    Ref:=
    InputBox ( Prompt:= , title:= , default:= , xpos:= , ypos:= , helpfile:= , context:= ) ) ' If helpfile is provided, context must also be provided. Button comes then automatically.
    MsgBox ( prompt:= , buttons:= , title:= , helpfile:= , context:= ) ' If helpfile is provided, context must also be provided . _ For the required Button buttons:=vbMsgBoxHelpButton must be given
    Application.InputBox ( Prompt:= , Title:= , Default:= , Left:= , Top:= , HelpFile:= , HelpContextID:= , Type:= ) ' “Buggery Features”: In Excel 2007 + Left:= , Top:= , HelpFile:= , HelpContextID:= can be anything and are ignored
    Application.Help HelpFile:= , HelpContextID:= ' , HelpContextID:= is optional

    https://stackoverflow.com/questions/...e-was-canceled
    https://msdn.microsoft.com/en-us/lib...(v=vs.60).aspx
    https://www.youtube.com/watch?v=1gdGpnCCFWM
    **** http://www.winfaq.de/faq_html/Conten...?h=tip2026.htm
    Last edited by Doc.AElstein; 01-25-2018 at 04:25 AM.

  11. #11
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    VBA InputBox Function --- Option HelpFile:= , Context:=

    Create a Help Project. Aka make a .chm file that probably won’t work
    Part 1 HTML Help Workshop Development Environment


    This is a massive topic on its own and needs a book. And then finally it usually does not work anyway. No wonder most people ignore it, or are blissfully in ignorance about it. I can only try to make notes here of walking through an almost or partially finally working .chm file. So much is broke. ( Buggery Microsoft Features ) that you need a full time computer expert to do the smallest thing in “creating a Help project”, that is to say giving you a final .chm file that most likely won’t work anyway
    I will try to do the minimum to answer the original Thread question.
    This Post looks generally at a Development Environment Tool typically needed and used to finally produce the required .chm file.
    The Posts after walks through one way which on average gave me the best chance of achieving a final working .chm

    Part 1 HTML Help Workshop Development Environment
    There is a development environment you will usually need.
    One is a software from Microsoft called “HTML Help” or “HTML Help Workshop”, ( Also some others are available, but I wont consider them here )
    You need to have one of those programs, I will only consider Microsoft HTML Help Workshop. If it is not already on your computer, then you will need to install it. – You might already have it as it comes as standard with some other software.
    It looks and works distantly similar to the VB Editor window in Excel.
    It is fairly similar to Visual Studio development environment.

    If you want to download it is probably best to do it directly from Microsoft. I did it yesterday from here https://www.microsoft.com/en-ca/down....aspx?id=21138 I downloaded a few things, I am not quite sure yet exactly if I need all of them. It is free.

    You will probably need a software , “Notepad ++” also ## more on that later..

    Create a “Help Project”
    An “HTML help project (.hhp) file” is that which brings together all the elements of a “help project”.
    The word “help project” is just a word thrown around and does not mean too much.
    The .hhp File contains the information that a software such as HTML Help Workshop needs to finally make a (.chm) file. I have no idea how and what a .hhp may “look like”. I doubt many do. ( But you can see and work on a bit of that directly ## )
    A software program such as HTML Help Workshop is what is usually needed to do anything useful with this file.
    But whether by accident or design, you can also “open” a .hhp file with a software called Notepad++ . ## . This is a free software , something like a special text editor that recognises different file types. It somehow knows how to present them according to what type they are such that you can work on them. You will likely need this to make a workaround to a Buggery Feature

    Use a software like HTML Help Workshop
    You may be able to find a lot better explanation than I can give, for example free on the internet. I couldn’t. In some You Tube videos the authors were continually stumbling about and clearly were just as confused as me as to what it was all about.
    It is very similar to Visual Studio. The way most You Tube videos that I watched explained how to use it was not quite the same as it worked finally by me. But as they explained it, .. was usually not much like it was actually working for them either.!! So it is probably best to watch a few then have a play around yourself. It was very difficult to get started especially because of the endless Buggery Features
    I will try my best to walk through a working example in the next Posts

    A few tips to bear in mind for now .

    _1_ Desktop shortcut icon
    Once installed and you find HTML Help Workshop via the bottom left Microsoft Symbol route, then you can make a Desktop shortcut icon by copying “it” as seen and pasting into the desktop. Somehow this automatically makes a Shortcut Desktop icon
    HTMLWorkshopShortcutIcon.JPG https://imgur.com/9uylGaF
    You can double click on that icon to open up HTML Help Workshop

    _2_ Compile and Save and Save All Files…( Save type” Options )
    This point will be gone over again in the next post. Just some general info here about it
    Get in to the habit of saving all files , then compiling them, saving all files then compiling after you change anything…. Etc… etc… something like ……_..
    _.. File ( Top left ) --- Compile ( from drop down list obtained after hitting File ) ---
    File --- Save All Files ( from drop down list obtained after hitting File ) You may not see this option initially
    Alternatively checking some option such as this may help do that automatically on selecting Complile:
    SaveAllBeforeComplie.JPG https://imgur.com/UziBbAR !!!

    Anyway, There are different “Save type” Options:
    Compile
    Compiling is something that with newer software is somehow done instantly or automatically when you save. Compiling converts what you have done / your files into a more lower level source code which will later be used to actually run from. ( In our case the compiling “makes” the .chm file )
    Save Project Save File Save All Files
    I expect that just “Save ing” alone without compiling will mean you can reopen for example after a crash and get back to where you were. You may not want to compile before you have finished what you are doing so as not to replace yet any working source code ( .chm ) produced from an earlier compile.
    Save Project
    I expect this saves the .hhp File.. In other words this is the “save but not compile to make a .chm yet”
    Save File
    There are a few file types (.hhk .hhc .htm ) that you mess about with when developing the “help project”: You can edit these individual Files. Save File probably saves the current File being worked on
    Save All Files
    I expect this may, as its name suggests, save everything. It is not quite clear the difference between Save All Files and Save Project. It may be that Save Project primarily saves the .hhp file. This file possibly mainly refers to the files rather than actually “holding the files”.




    Ref
    https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx
    https://www.codeguru.com/cpp/w-p/hel...-HTML-Help.htm
    https://support.microsoft.com/de-de/...sensitive-help
    http://www.help-info.de/en/Help_Info...context-id.htm
    Last edited by Doc.AElstein; 01-24-2018 at 04:33 AM.

  12. #12
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: VBA InputBox Function --- Option HelpFile:= , Context:=

    Create a Help Project. Aka make a .chm file that probably won’t work
    Part 2 A walkthrough example
    Part 2a) Getting a .chm file that might come up by double clicking on it or via Application.Help HelpFile:=MyCodeX.chm

    _3_ Buggery Features 3 / Workaround ( To understanding WTF Microsoft HTML Help Workshop is ) :
    This is just one way that on average lead to the most success of getting a final working .chm
    Instead of starting from scratch, I found I had a better chance of producing a final .chm if I started with one that worked and went backwards.
    Unfortunately this is characteristic of many things Microsoft. You need to have a working answer to or a working solution to get there ? A “chicken and egg” situation. So I have done my best to give a working solution on which to build / modify.

    In a way I am not really using the Microsoft HTML Help Workshop as it is intended. I guess the Idea is that you can make , edit and organise all the files you need to create a final .chm with the Microsoft HTML Help Workshop Development Environment. Sounds simple but I could not find any decent documentation or learning material. In most of the You tube videos the author seemed confused and surprised half the time as to what was actually going on


    To start with you need to have a working .chm. – See if you have any on your computer already that seem to “work” by method (i) (ii) or (iii) with or without the workarounds. Or try the same with some of the .chm files that I shared in the last post. (Here again: https://app.box.com/s/bx2pkvtemsppscz60rd6f430wm89c6fj https://app.box.com/s/varm2k1ojlwwtemnefuhhnym1d84bcxs
    You can put the .chm anywhere, but make a note of where your then final “working” .chm file is so that you can find it later. - Remember you may need to apply the workarounds to get it to work.
    Now before you do anything else, get a full or almost full set of files needed to make a .hhp file. One way I found to do this was by “decompiling” an existing working .chm
    _3a) Decompile a .chm / make a separate Folder
    Problems seemed to be smaller, on average, if everything to do with a single help project was kept in the same Folder. ( Theoretically that is not necessary). ‘_- So make a new one.

    Open HTML Help Workshop by
    __ double click on your desktop short cut key icon if you have one,
    or
    __ navigate to it from _ Microsoft symbol bottom left --- All Programmes --- HTML Help Workshop
    or
    __ _ Microsoft symbol bottom left --- start typing HTML Help Workshop in the small search bar then --- click on it when it appears in the Window above the search bar

    The main development environment window should then pop up, then to do the decompile..
    _ File ( Top left in the development environment window ) --- Decompile
    FileDecomplie.jpg https://imgur.com/CAt3wCO
    The destination Folder is the new Folder you just made ‘_-
    The Complied help file is a “working” .chm ( Browse to find it or type in the full path and file name if you are sure of it)
    So having pasted in or Browsed to find then selected so as to fill in the two boxes, .. then hit, --- OK
    ToFolderFromCompiledchmFile.jpg https://imgur.com/6VgmCCb
    This should result in something like this:
    TypicalDecompiledchm.JPG https://imgur.com/aNVpsmr
    There are usually 3 main types of “data type” file required to make a final .chm, file along with the .hhp file. In that decomposed collection of files one sees one or more of those 4 types

    .hhc --- Table of Contents File: This will typically be the data file required to make the usually as default explorer type thing in the left of a finally seen help type window
    .hhk --- Index: Similar to .hhc and is used for a simple List alternative option
    .htm --- HTML File: these files are basically text files written in the HTML language ***
    A hhp is always needed which will typically consist of the above files, or rather references to them. A saved hhp file which “contains” / “refers to” those files is what may typically be referred to as the “project” or “HTML project” . A finished “project” would typically have all the infomation required to produce the final .chm. The action of compiling is what makes a final .chm file. Sometime the word “project” might include also a final complied .chm file. The words “help project” is used very loosely.
    _3b) Use same Folder for a new .hhp file
    The exact route that I am walking through is not the only way to make and manipulate a final “project” and final .chm file. Various options are available. Once you have successfully produced a .chm file, then a bit of playing around and / or looking up Blogs or You Tube videos will soon get you familiar with a more full usage of the HTML Help Workshop, or probably not. I gave up.
    The making of any file starts at clicking File ( Top left in the development environment window ). For a new “project”, that is to say begin making a .hhp file:
    File ---- New ( from drop down list obtained after hitting File ) --- Project --- OK
    FileNewProjectOK.JPG https://imgur.com/qA1oyLq
    For the case of selecting New, a poxy set of so called “Wizard” windows pops up to guide you through the process for a New “project”.
    For us the first Window is not important so just Hit Continue to get the second “Wizard Window”.
    The second allows theoretically for determining any Name and Folder for the new .hhp file. I found in the practice that I got less problems later if I choose the same Folder as where I placed the decompiled files. Hit Browse, navigate to that previously made Folder, type in any file name and hit Open
    NewFileAnyNameOpen.JPG https://imgur.com/G4boYVP
    The full Path and File name of the hhp file should then appear in the “new Project Wizzard”. Hit Continue
    PathAndFilenewhhp.JPG https://imgur.com/tM9AIqY
    What happens next may not be the most usual way to start a new project. As mentioned I am not starting from scratch. Also there are a couple of ways to proceed now to add the existing Files. Read the next section through at least once before you actually attempt it as there are varying options. Or just go ahead . You can always abort ( close HTML Help Workshop ) at most points and start again
    _a) In the next “Wizard Window” I begin selecting existing Files , for example:
    ExistinghhcFile.JPG https://imgur.com/8Od0yuR
    A “Wizard Window” appears similar to that which allowed selecting of a File name for the new project. Browse and select the hhc File and hit Open
    BrowseFindOpenhhcFile.jpg https://imgur.com/XeoxhDH
    Hit Continue followed by Finish
    Repeat the above for the index, ( hhk ) file and one or more of the HTML Files
    Or
    _b) In the previous _a) next “Wizard Window” select all three options
    SelectAllThreeExistingDataFiles.JPG https://imgur.com/VCJLrHo
    The “Wizard” will then prompt for, and guide you through, selecting all the files you wish to have.
    Finally you Hit Finish at the end, but…before you do that.. some notes to be aware of
    Note:
    __ for selecting more than one HTML file you can
    _either start again for each HTML file from
    File --- New --- HTML Files – - etc…
    Or
    _The first time that you have browsed for the HTML Files and are in the Window explorer of the Folder in which the decompiled files are, Hold down the Ctrl Key and then you will be able to select more than one file, then Hit Continue

    Note also:
    __ that the Wizard aids in selection by only offering in the browsed explorer Window files of the type that you are currently adding
    __ In selecting the HTML Files you will probably want to include the file for the Index page .htm file and at least one “normal data” .htm file
    Add2HTMLFilesIndexAndOneOther_1_2.JPG https://imgur.com/pSNWNGx
    Add2HTMLFilesIndexAndOneOther_3_4.JPG https://imgur.com/CDemFkE
    __ The exact way you get to the point just before Hitting Finish will vary as you get more practice. There are no particular problems with aborting and starting again. At this point you should probably experiment a bit with editing, changing or even adding newly made files if you feel confident enough. The possibilities and ways to do this is too vast a topic to cover here. (After the last few steps you should have more or less most of what you “need” to get a successful compile to produce the final .chm ….You should at least have enough to get a successful compile… the final .chm probably won’t work )

    After Hitting Finish you will see for the first time a .hhp File in the chosen Folder, and also the HTML Workshop Window will include now an extra section to the left.
    FinishedhhpFile.JPG https://imgur.com/0AX7Nm7
    At this point you will notice that on Hitting File you only get, in the drop down list, the Save option of Save Project
    FileSaveProjectOnly.JPG https://imgur.com/CWxIVvA
    This saves the “project” only. ( we have not compiled yet so have no .chm file ). This saving of the project was probably done pseudo automatically and simultaneously as the Finish was Hit. Any Editing or adding of further files done from this point will only be reflected in the final complied .chm if a Save Project is done ( File --- Save Project ) after such changes and/ or additions followed by a compile.
    ( Depending on exactly what you did, or want finally, you might have had to use the different “Save” options at different times.. - As I mentioned , you usually get in the habit of just saving all files and be done with it )
    At this stage a _ File --- Compile _ will produce the a .chm file.
    So try this and look in the folder ( Note once again the option to Save always before a Compile (!!! SaveAllBeforeComplie.JPG https://imgur.com/P4s3iMI - This may be standard. I don’t know. ) )
    FileCompile.JPG https://imgur.com/S7LttM1
    FileComplieContinue.JPG https://imgur.com/S7LttM1
    Note: The default path and chosen project ( hhp ) file used may be the previously made and used Folder and project file, but it may be advisable to check this with Browse
    ComplieFromProjectFile.JPG https://imgur.com/d1IjbFh
    After a successful compile, in the Folder should now be seen for the first time the .chm file
    Compiledchm.JPG https://imgur.com/bLKI8a0
    If you are lucky, a simple double click should launch successfully the .chm and result in the help Window opening. And or a code line of the below general form will launch it. ( You may or may not need to mess about again with the discussed workarounds ).
    Please Login or Register  to view this content.
    It is highly unlikely that the .chm file will be able to be launched from the help argument options in InputBox Function. It is unlikely that anyone ever did it, or if they did it was a very long time ago. Possibly it may never have worked. But I have got it to work, and that is discussed in the next post.
    Last edited by Doc.AElstein; 01-25-2018 at 04:26 AM.

  13. #13
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: VBA InputBox Function --- Option HelpFile:= , Context:=

    Create a Help Project. Aka make a .chm file that probably won’t work
    Part 2 A walkthrough example
    Part 2b) Getting a .chm file that might launch from the help argument options in InputBox Function

    _4_ Buggery Feature Context-Sensitive Help ( InputBox Function )
    A special form Of Cursor Lock:= was used when the Microsoft data base xxxxs developed a few things:
    Cursor Lock:= Load of dis coordinated Bollox aka Another mess and it does not work ever not even from the start but don’t tell anyone maybe they won’t notice.

    From the last post we see that for _ InputBox Function ' If helpfile:= is given , then context must also be provided. ( This is not the case for Application.Help, - the HelpContextID can be omitted. )
    But possibly someone that should have taken that into consideration forgot about or did not know that . Oh dear.
    In fact, frequently a problem arises ( not just in the case of the InputBox when calling up a help Window ) : You may get an unexpected error, or rather an error message , something of the form
    ___ HH_HELP_CONTEXT called without a [MAP] section
    HH_HELP_CONTEXTcalledwithoutaMAPsection.JPG https://imgur.com/8NOQW95
    ( The code may go on further never the less , after hitting OK, or even in some case it will move on whilst the Message box is still showing, but the Help Window you wanted will not be shown.
    The following workaround may get around this problem.

    Workaround: ( Patch up the .hhp file )
    From this point I am not quite sure what it is that I am doing, but it appears that some “directions” are missing. These are necessary to satisfy one of the standard Windows programs ( API ddl stuff: http://www.eileenslounge.com/viewtopic.php?f=18&t=28885 ) which is called into use , for example, by the the context:= argument parameter, which in the case of the InputBox Function is not optional once the helpfile:= is given.

    ## The main project file ( the file with the .hhp extension ) can be opened with a text editor such as Notepad++. Or at least if you do that something is displayed which you can edit as if it was normal text. What you see there is similar to what you see in the left hand window of the HTML Help Workshop window after you have a created/ compiled project:
    One way to get to this is in the Windows File explorer Window select and right click mouse to get the option to Edit with Notepad++
    RightClickOnhhpFileOpenWithNotepadPlusPlus.JPG https://imgur.com/7AOgfiQ

    By modifying the .hhc project File in Notepad, saving that, and then opening the hhc project file in Microsoft HTML Workshop, and finally compiling will result in the changes reflected in the final .chm file

    These following changes, taking the current working example as example will illustrate the added information which appears to add the “missing directions”
    Part of the initial File looks something like this, here in this example showing two HTML Files:
    Please Login or Register  to view this content.
    Somewhere under that must be added something to give finally in place of that above , the following final text shown below
    Please Login or Register  to view this content.
    After doing this, the file must be opened in Microsoft HTML Help Workshop and compiled to produce a new .chm
    Usually then I got success in calling up a help window from a code line including both of the two options
    of
    HelpFile:=
    and
    the context:= or HelpContextID:=.

    Exactly what is going on there is anyone’s guess, or those that know won’t tell, maybe as they forgot to get the whole thing co coordinated correctly from the start. For some unknown reason a constant variable must first be associated with a File, ( That is the AliAS stuff ), after which a number can be given to that variable.
    I got this info from various reported ways to fix various bugs, ( those were not directly related to anything to do with the InputBox Function ), so I expect there are some integrate internal coding reasons for having to do this bodge ( workaround )

    Note also interestingly, that in both the case _... of the
    _ InputBox __ ‘ including HelpFile:=, and context:=
    and the
    _ Application.Help __ ‘ including the optional HelpContextID:= argument
    _... as long as valid sections are given in the hhc “text” section, then the code will not error if a non existent Context number is given. In this case no help window comes up.
    If a valid ( existent ) context number is given then… if you are lucky… it works finally !!!!
    _...____

    So I got it to work., finally….
    I went through worked examples following all the stuff that I have tried to explain in the last few posts..
    Then when I run a code like this:
    Please Login or Register  to view this content.
    This is what happens:
    First an InputBox pops up,
    and then
    if you select the Help Button, ….. then a help Window comes up
    HelpGetUpBollox.JPG https://imgur.com/KdKOYWr







    Conclusions:
    I think am happy to mark this thread as [Solved].
    I have got as far as making the_..
    HelpFile:= HelpContextID:=
    ( or rather the InputBox Function which works
    HelpFile:= Context:= )
    _..options in the typical “simple Pop up user interface message box / input box” to work, after a fashion, to do whatever it is that they should do.
    What they should do is at least clear now:, ( Obvious to some maybe.. but no documentation says this clearly … ): The typical _ helpfile / context _ optional arguments should cause an extra button to appear which when Hitting should launch a Window which is part of the “integrated Microsoft Help” thingy.
    I have gone where probably not many have in recent years, and that is to get working examples.
    I’ve got far enough to realise that the “integrated Microsoft Help” thingy might have been somebody’s career making pet idea for a while and seemed a good idea at the time. In the mean time it is a mess and usually does not work.

    It would probably be better to go back to writing notes on the back of a Beer mat
    ( And don’t bother with the drink Microsoft 'Kool Aid'. – drink something better. I can recommend some good dark German Bier )

    [Solved]
    Alan

    P.s.
    ( Any comments or further inputs would be very welcome, Thanks )







    Ref
    https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx
    https://www.codeguru.com/cpp/w-p/hel...-HTML-Help.htm
    https://support.microsoft.com/de-de/...sensitive-help
    http://www.help-info.de/en/Help_Info...context-id.htm



    Some general notes:

    Files:
    hhp _ is a project File. The big thing that you usually will want to create as / with _ File --- New _ with HTML Help Workshop or other software. This will somehow contain or at least “manage” somehow the following 3 file types

    “data” type files, which are used in
    hhc _ is a Help table of contents, usually just 1 I think
    hhk _ is a Help index, usually just one I think
    htm _ are fairly standard HTML file thingies. If you read any good introduction article, book or watch a good introductory You tube video then you will soon get the general idea
    https://www.youtube.com/watch?v=1gLh...D6F7E289625976
    These HTML files contain as main part the bulk of all the text and other stuff you actually want to read. If you are lucky then you might find that simply double clicking on them will “bring them up” as normal looking stuff to read. This probably will come up in your internet browser: Most browsers I expect recognise these types of files, and you can also probably get them up manually if you copy the whole string path and file name and then paste it into the URL bar of your browser ( URL Bar = the place where you usually see the long _ https://www.goog………………. _ – In place of that paste in the _ G:\Excel0202015Jan2016\Ex……………\Part2.htm )

    Modifying Files:
    The hhp file opens in Notepad ++ and shows some text. ## This was useful in order to modify to add those missing [ALIAS] and [MAP] bits
    All other files can be opened and modified in a text editor such as Notepad or Notepad ++

    Actually making/ modifying a “Project”:
    I’m buggered if I could actually work out how to use the HTML Help Workshop Development Window in the efficient way that I expect it should be.
    I expect the idea is that you move around and modify the HTML Files and some how do all the index and contents automatically. But god knows how.

    This is how I actually got the stuff working…
    Way a) manipulate all files with text editors… mostly !!
    The hhc and hhk files ( List index contents stuff ) look similar and have to stay similar, at least as far as how the HTML files they reference is concerned.
    You open them up with a text editor, preferably both at the same time, and make sure that the HTML Files that they reference exist.
    Changehhkhhchtm.JPG https://imgur.com/0gMOk8J
    Once you have done that, then you don’t actually have to “load the HTML Files”… when you make a new project… these files, and / or the hhp file and / or the complied .chm “ know where they are and what to do with them.
    The HTML Files you then modify manually by opening them up in a text document .. or even in Word it seems possible !!

    Default Topic Index Page Title Page
    The hhc File and the bit of the hhp File that opens in a Notepad ++ and the left margin window must all reference the same Default topic=, but god knows what that is – it seems to be some HTML file that must also exist
    So you need to change 4 things simultaneously,
    _ 1 hhc File in a text document
    _ 2 the bit of the hhp File that opens in a Notepad ++
    _ 3 !! and for this you have to be in the Microsoft HTML Help Workshop Development Environment .. modify the left margin window bit .. Project .. [OPTIONS] …..
    _ 4 the name of the HTML file
    IndexPage_1_2_3_4.JPG https://imgur.com/ztE5ZES

    Way b) In the Microsoft HTML Help Workshop Development Environment
    Select either the Contents or Index tab ( to right of the Project tab ) , and double click on the bit you want to modify. The corresponding HTML File comes up the main big window and you can work on it similarly to as if you had opened with a text program such as Notepad or Notepad++
    Last edited by Doc.AElstein; 01-24-2018 at 05:29 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Inputbox vs. Application.InputBox
    By miyachow in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-08-2013, 12:53 PM
  2. [SOLVED] Using Application.InputBox gives Errors
    By boela in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-22-2013, 10:44 AM
  3. [SOLVED] Application.Inputbox
    By Hilton1982 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-14-2012, 09:16 AM
  4. Customized Application InputBox
    By madaboutgolf in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-07-2011, 11:15 PM
  5. Screen positioning inputbox that is set as Application.InputBox
    By vdongen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-06-2010, 07:59 AM
  6. Application.inputbox
    By davegugg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-08-2009, 11:27 AM
  7. inputbox and helpfile
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2006, 07:15 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1