Discussion Locked

help button in vba

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

i have a msgbox and i want to add a help button..i got my help button added but cannot figure out how to get my display box to show up when you click on the help box...it does nothing of course cause i do not know where to put info on what to selectwhen it opens? here is my code:
Sub Accumulator()
If Int(Now()) - Int(Worksheets(3).Range("h1").Value) <> 0 Then
Worksheets(3).Range("f1:f1000").Copy
Worksheets(3).Range("g1:g1000").PasteSpecial Paste:=xlValues, Operation:=xlAdd
Worksheets(3).Range("h1").Value = Now()
Else
MsgBox prompt:="This sheet has already been updated for the day.", _
Title:="A T T E N T I O N T A C C O N E !!!!", _
Buttons:=vbOKOnly + vbExclamation + vbMsgBoxHelpButton
End If
End Sub
any suggestions?
my display i want to call up is named MHV and it is located in with all my sheets and workbook and all..it is set up as a user form..
thanks

3 replies

by dklippert

Look for MsgBox in the object browser of the Visual basic editor. Here is the sample code they give:

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

This discussion is closed to new replies.