Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Message Box Command Button

Status
Not open for further replies.

33216CLC

Programmer
Aug 17, 2000
173
BS
Hi,

I would like to place a command button, other then the typical VBok, Cancel, Yes, or No buttons.


How can I go about doing this.

Thanks for any help.
 
Do your own form with command button control array and call a function within.
'* Form = frmWZUP
'Form Level Declarations
Private mintResult as integer
Public Function WZUP() as integer
Me.Show vbModal ' Stiop excution until hidden
WZUP = mintResult ' Do before Unload
Unload Me
' Force complete unload, not just controls
Set frmWZUP = Nothing
End Function
Private Sub cmd_Click(Index as Integer)
mintResult = index
Me.Hide ' Resume execution after Show vbModal
End Sub
Compare Code (Text)
Generate Sort in VB or VBScript
 
Hi 33216CLC
If you use the msgbox function then you're stuck with the
pre-defined button properties e.g.
vbOKOnly
vbAbortRetryIgnore
vbRetryCancel
etc.
But there is nothing preventing you from designing your own form/msgbox with all the custom buttons you want.

Jon
 
There is a free message box control at I have used it and it is much easier than the typical MSGBOX. You can customize up to 4 buttons, and customize the icon. On the VB2themax page, click on File Bank, I think. There are a number of good controls there, but that is the best on I have found. Let us know if it works for you. :) Good luck!
 
goatsaregreat,

Thank you. I saw many useful controls at this site. As soon as I take a look at the messagebox contol, I'll let you know.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top