Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Yes to All???

Not an option, unfortunately. A Userform shouldn't be awfully difficult.

One way (Userform1 with 1 label and three buttons):

Module code:

Public Sub test()
Dim MsgForm As UserForm1
Dim nResult As Long

Set MsgForm = New UserForm1
Load MsgForm
With MsgForm
.Label = "My Prompt"
.Show
nResult = .Result
End With
Unload MsgForm
Set MsgForm = Nothing
Select Case nResult
Case -1
'Do "Yes" stuff
Case 0
'Do "No" stuff
Case 1
'Do "Yes to all" stuff
End Select
End Sub


Userform1 code:

Public nResult As Long

Property Let Label(sLabel As String)
Label1.Caption = sLabel
End Property

Property Get Result() As Long
Result = nResult
End Property

Private Sub CommandButton1_Click()
nResult = -1 'Yes
Me.Hide
End Sub

Private Sub CommandButton2_Click()
nResult = 0 'No
Me.Hide
End Sub

Private Sub CommandButton3_Click()
nResult = 1 'Yes to all
Me.Hide
End Sub


In article ,
"big t" wrote:

does anyone know if I can get a message box in vba with three options -
"Yes", "No", and "Yes to all"??? Don't really want to design a form if I can
help it!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"