I've tried several options to get the worksheet to unhide and have been unsuccessful. I can get the message box responses to work, and direct to the wanted worksheet when not hidden though.
Here's my last attempt:
------------------
Private Sub CommandButton1_Click()
If MsgBox("Have you confirmed use with Department A?", vbQuestion + vbYesNo) = vbNo Then
If MsgBox("Have you completed the questionnaire?", vbQuestion + vbYesNo) = vbNo Then
If MsgBox("Have you received authorization to bypass?", vbQuestion + vbYesNo) = vbNo Then
If MsgBox("Please contact Department A for further instruction.” & Chr(10) & Chr(10) & "Contact Jane Doe at 555-123-4567.", vbCritical + vbOK) = vbOK Then
End If
ElseIf Click = vbYes Then
Sub Unhide_Sheets_Containing()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
If InStr(ws.Name, "Request Form") Then
ws.Visible = xlSheetVisible
End If
Next ws
ThisWorkbook.Sheets("Request Form").Activate
End Sub
End If
ElseIf Response = vbYes Then
For Each ws In ActiveWorkbook.Worksheets
If InStr(ws.Name, "Request Form") Then
ws.Visible = xlSheetVisible
End If
Next ws
ThisWorkbook.Sheets("Request Form").Activate
End If
ElseIf Response = vbYes Then
For Each ws In ActiveWorkbook.Worksheets
If InStr(ws.Name, "Request Form") Then
ws.Visible = xlSheetVisible
End If
Next ws
ThisWorkbook.Sheets("Request Form").Activate
End If
End Sub
Bookmarks