• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Hyperlink in a MsgBox

Shaun

Member
Hi All


I have been looking around and searching for a possible solution for a few day now, but I have not had any luck, so there may not be a solution. I am hoping someone here may have an insight...


I am preparing a worksheet which is essentially a decision tool which requires the user to answer a series of Yes/No questions which the advises the necessary actions that must be taken.


In a couple of the message boxes there are some questions that ask if a particular test has been satisfied with Yes/No buttons.


I am wondering if it is possible to incorporate a hyperlink style link which when clicked opens a second message box explaining the requirements of the test.


For example:

Code:
CHTStep22075YN = MsgBox("Does the " & Tname & " satisfy the '20/75 test'?", 36, "Trust Reporting Rules")


would it be possible to create a hyperlink for " '20/75 test' "?


If this is not possible, is there an alternative?


Cheers


Shaun
 
I think you'd have to build a UserForm, and add an extra command button that could take the user to the 20/75 test. MsgBox is fairly limited in what it can do.


Or, you could have the msgbox display 3 buttons such as yes/no/cancel, and tell the user to click "cancel" if they want to open the file. You could then test for this and open the file...could get a little tricky with keeping things in order, but just a thought.
 
Hi Shaun ,


MsgBox has a provision for displaying the contents of a help file , along with the Help button in the message box ; can you not use it ?


Narayan
 
A help button...


Is it difficult to prepare the help file and button? Google is my friend, I will have a look around to see what I can find.


Thank you both for your help.


Cheers


Shaun
 
Hi, Shaun!


Maybe you want to give a look at this:

http://www.excelguru.ca/content.php?166


Regards!
 
Hi Guys


SirJB7 that is a great link, but requires other applications to make work (which I don't think I have) or rights to install.


I might but trying to take a short cut which isn't really there, but, I have changes the message box code to:


Code:
CHTStep22075YN = MsgBox("Does the " & Tname & " satisfy the '20/75 test'?", 16420, "Trust Reporting Rules")


Which now brings up Yes, No and Help buttons. I know that Yes = Case 6 and No = Case 7, surely Help = Case ??. If that is true, could I then use case ?? to display a another message box?


How can I work out what Case is satisfied for the help button?


Cheers


Shaun
 
Hi Shaun ,


Have you tried using the MsgBox statement like this ?


MsgBox "Give your own prompt here", vbQuestion + vbYesNo + vbMsgBoxHelpButton, , hlpfile, 1


where hlpfile is the path to your own help file , and 1 is a number standing for ContextID. You will have to check whether this works or not.


Narayan
 
Hi Narayan


I could not get your solution to work :(


I will need to invest some time to go through the link provided by sirJB7 and try and get my head around it. The problem as I can see it is that the "Help" button is treated differently to the others, where OK, Cancel, Abort, Retry, Ignore, Yes and No produces an integer 1 through 7 respectively on which Select Case operates, when Help is clicked it, performs a predefined action...opening a help file.


It is not imperative to complete the project, but it would have been nice to include some help, so I will add as time permits.


Thank you all for your help.


So where
 
Hi, Shaun!

I'm afraid that neither Windows nor Office nor any other usual MS software includes a builder/compiler for creating help files, so sorry to say but you'll need to get the sofwared and get it installed somehow. No workarounds, at least that I can see.

Regards!
 
Okay I have the software up and running...had a bit of play...seems doable!!


Give me a week and I will share what I come up with (time permitting of course)


Cheers


Shaun
 
Hi, Shaun!

Good luck and keep us informed, specially about your experience with that software. A couple of samples would be nice too.

Regards!
 
Back
Top