AwesomeSteph
Board Regular
- Joined
- Aug 18, 2017
- Messages
- 80
I am having a difficult time figuring out how to have a yes/no messagebox selection open another yes/no messagebox. Is this not possible and I need to use a userform?
Sub OneMsgBxTrggersAnother()
Dim ans As Long
ans = MsgBox("This is the first message box, click Yes to get a second message box", vbYesNo)
If ans = vbYes Then MsgBox "This is the second message box"
End Sub
Dim MsgTitle, MsgPrompt As String, Ret As Integer
If Not Intersect(Target, Range("B12")) Is Nothing Then
Application.ScreenUpdating = False
MsgPrompt = "Is this either a New Task, or a Technical Change?"
MsgTitle = "Possible Engineering Review Required"
If Sheet1.[B12].Value <> "" Then
Ret = MsgBox(MsgPrompt, vbYesNo, MsgTitle)
If Ret = vbNo Then
Sheet8.CheckBox1.Value = True
Sheet8.CheckBox2.Value = True
MsgBox "verify (Review Not Required) Boxes are checked on lines 1 and 2 of SA20045 form"
Sheet7.Visible = xlSheetVeryHidden
Else
MsgBox "Ensure SA20044 Form is included with deliverable"
Sheet8.CheckBox1.Value = False
Sheet8.CheckBox2.Value = False
Sheet7.Visible = True
End If
End If
End If
thanks.No, it doesn't have to be in a separate sub - just trying to show you the logic required which you can adapt to your event code. The 2nd box can be Yes/No, too, if that's what you want.