Hi all,
I want to incorporate message box at the beginning of a long code.
Message box has 'YES' and 'NO'
If answer is yes then it should continue with further routine.
If answer is NO then :
1. It should get message box ' Go to sheet2'
when pressed OK then sub is exited
2. and sheet2 activates
This is repeated until the answer is YES.
Code
Sub Msgbox_Yes_No()
Dim Response As Integer
Response = MsgBox(prompt:="Have you done Defib Checks First?'.", Buttons:=vbYesNo)
If Response = vbYes Then
MsgBox " Thanks"
Else
Do
' I need help here
MsgBox " Go to Sheet2"
This workbook.Sheets ("Sheet2").activate
This workbook.Sheets ("Sheet2").visible
Loop While Answer = vbYes
End If
End Sub
Any help please
Thanks
kind regards
Bookmarks