ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   MsgBox Replacement w/ an UserForm (https://www.excelbanter.com/excel-programming/313053-msgbox-replacement-w-userform.html)

Chuckles123[_34_]

MsgBox Replacement w/ an UserForm
 

Bob,
Thanks.
Formatting is easier in a Form. Also, the 'Yes-No' buttons are no
applicable to the options that I am giving the user.
I would appreciate if you or someone could give me a few lines o
code.
Chuckles12

--
Chuckles12
-----------------------------------------------------------------------
Chuckles123's Profile: http://www.excelforum.com/member.php...fo&userid=1494
View this thread: http://www.excelforum.com/showthread.php?threadid=26787


sebastienm

MsgBox Replacement w/ an UserForm
 
Hi,
I don't have code, but just a few details about MsgBox (see online help):
You have other buttons available in msgbox:
-vbOKOnly 0 Display OK button only.
-vbOKCancel 1 Display OK and Cancel buttons.
-vbAbortRetryIgnore 2 Display Abort, Retry, and Ignore buttons.
-vbYesNoCancel 3 Display Yes, No, and Cancel buttons.
-vbYesNo 4 Display Yes and No buttons.
-vbRetryCancel
So if want to display Abort,Retry,Ignore buttons with a Warning icon:
MsgBox "did Not Work!", vbAbortRetryIgnore + vbCritical, "TEST"
as you can see , you just have to add the vbMsgBoxStyle in the Buttons
parameter as in : vbAbortRetryIgnore + vbCritical

Would that be enough flexibility in your case?
But maybe you already know about that and it doesn't fit your needs.

Regards,
Sebastien
"Chuckles123" wrote:


Bob,
Thanks.
Formatting is easier in a Form. Also, the 'Yes-No' buttons are not
applicable to the options that I am giving the user.
I would appreciate if you or someone could give me a few lines of
code.
Chuckles123


--
Chuckles123
------------------------------------------------------------------------
Chuckles123's Profile: http://www.excelforum.com/member.php...o&userid=14948
View this thread: http://www.excelforum.com/showthread...hreadid=267872



Tom Ogilvy

MsgBox Replacement w/ an UserForm
 
In a general module:

Dim ans as String
Sub showform
userform1.show
if and = "House" then

else


end if
End Sub


in the userform1 module

Private Sub commandbutton1_click()
ans = "House"
Unload Me
End Sub

Private Sub commandbutton2_click()
ans = "Cabin"
Unload Me
end sub

--
Regards,
Tom Ogilvy


"Chuckles123" wrote in message
...

Bob,
Thanks.
Formatting is easier in a Form. Also, the 'Yes-No' buttons are not
applicable to the options that I am giving the user.
I would appreciate if you or someone could give me a few lines of
code.
Chuckles123


--
Chuckles123
------------------------------------------------------------------------
Chuckles123's Profile:

http://www.excelforum.com/member.php...o&userid=14948
View this thread: http://www.excelforum.com/showthread...hreadid=267872





All times are GMT +1. The time now is 06:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com