![]() |
html help and custom msgbox
This is about displaying HTML help files from a custom made Msgbox
because excel's Msgbox function evidently won't show the Contents/ Index/Search tabs in the HTML help window (Excel2003 windows XP). I have downloaded http://www.excelguru.ca/ExcelFiles/HTMLHelp.zip This indeed provides a very good re-enactment of excel's auto-sizing Msgbox, but I made the following changes to get it to work a little bit better. I found that the Escape key won't cancel the custom message box. I fixed this by putting in the following line: .Cancel = True right after each occurrence of .Caption = "Cancel" Also, to get the userform to work equally well with either a chm or hlp type of file I changed the following line: HTMLHelpShowContents 0, strHelpPath, &H1, 0 to: If InStr(strHelpPath, ".chm") 0 Then HTMLHelpShowContents 0,strHelpPath, &H1, 0 because otherwise an HLP file is first displayed momentarily at a requested contextid, but then switches to the contents topic. One other note - clicking on the X button in the upper right corner of the userform closes the form, but triggers an Ok instead of a Cancel. I haven't fixed that yet. I did all this in Excel 2003. I haven't tried it yet in Excel 2007. |
All times are GMT +1. The time now is 12:20 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com