Link to home
Start Free TrialLog in
Avatar of surajdeo
surajdeoFlag for Mexico

asked on

helpfile in msgbox using VB

Dear friend,
Please tell me how to open helpfile using msgbox
ASKER CERTIFIED SOLUTION
Avatar of harsh008_k
harsh008_k

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of virgils
virgils

   MsgBox "Errormsg", vbCritical, "Errortitle", "error.hlp"

goes like that, or like this (straight out of the help file)

This example uses the MsgBox function to display a critical-error message in a dialog box with Yes and No buttons. The No button is specified as the default response. The value returned by the MsgBox function depends on the button chosen by the user. This example assumes that DEMO.HLP is a Help file that contains a topic with a Help context number equal to 1000.

Dim Msg, Style, Title, Help, Ctxt, Response, MyString
Msg = "Do you want to continue ?"   ' Define message.
Style = vbYesNo + vbCritical + vbDefaultButton2   ' Define buttons.
Title = "MsgBox Demonstration"   ' Define title.
Help = "DEMO.HLP"   ' Define Help file.
Ctxt = 1000   ' Define topic
      ' context.
      ' Display message.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then   ' User chose Yes.
   MyString = "Yes"   ' Perform some action.
Else   ' User chose No.
   MyString = "No"   ' Perform some action.
End If

virgils, you are new to EE but you should be aware of the guidelines. Not only have you posted an answer to a thread when it should have been a comment (see comments vs answers at bottom of this page) but you have also copied the previous comment in its entirety, merely to attempt to steal the points from the previous contributor. Your account and this thread will be reported to customer services for action. It is possible that this action may include a suspension / termination of your account, especially if this behaviour continues.
Based on the guidelines listed below, I am rejecting your proposed answer.


Thank you
Computer101
Community Support Moderator

Comments
Comments are intended to be used as a collaboration tool. Many Experts choose to post their solutions as comments only.

Answers
An answer is a specific solution to a question and should be submitted if it will solve the questioner's problem and doesn't duplicate a previous comment.

Comment Vs. Answer
If you are unsure of your solution, post it as a comment. Members can accept comments as solutions and award you Expert Points for them.

For more tips on comments and answers, click here.

woops
owhyah, and i jus didnt read the previous comment fully, just cut and pasted sumthing from the helpfile, jus like i said, and i didnt read the guidelines, that a mistake i made, guess i jumped to conclusions too quick, i thought i gave an answer