Private Sub cmdShow_Click()
Dim answer As VbMsgBoxResult
Dim MsgBoxStyle As VbMsgBoxStyle
If optButton(0).Value Then
MsgBoxStyle = vbOKOnly
ElseIf optButton(1).Value Then
MsgBoxStyle = vbOKCancel
ElseIf optButton(2).Value Then
MsgBoxStyle = vbYesNo
ElseIf optButton(3).Value Then
MsgBoxStyle = vbYesNoCancel
ElseIf optButton(4).Value Then
MsgBoxStyle = vbRetryCancel
ElseIf optButton(5).Value Then
MsgBoxStyle = vbAbortRetryIgnore
End If
If optIcon(0).Value = True Then
MsgBoxStyle = MsgBoxStyle
ElseIf optIcon(1).Value = True Then
MsgBoxStyle = MsgBoxStyle + vbCritical
ElseIf optIcon(2).Value = True Then
MsgBoxStyle = MsgBoxStyle + vbExclamation
ElseIf optIcon(3).Value = True Then
MsgBoxStyle = MsgBoxStyle + vbCritical
ElseIf optIcon(4).Value = True Then
MsgBoxStyle = MsgBoxStyle + vbInformation
ElseIf optIcon(5).Value = True Then
MsgBoxStyle = MsgBoxStyle + vbInformation
ElseIf optIcon(6).Value = True Then
MsgBoxStyle = MsgBoxStyle + vbQuestion
ElseIf optIcon(7).Value = True Then
MsgBoxStyle = MsgBoxStyle + vbCritical
ElseIf optIcon(8).Value = True Then
MsgBoxStyle = MsgBoxStyle + vbExclamation
End If
MsgBox txtMessage.Text, MsgBoxStyle, txtTitle.Text
txtResult.Text = answer
End Sub