I have a sub with a MsgBox that asks for a Yes/No response. When No is selected the Shell command still executes. Suggestions?t
Sub ViewSavedFile()
MsgBox "To view your saved file Click Yes and select the one with your name and the latest Date/Time." _
& vbCr & vbCr & "Otherwise Click No" _
, vbYesNo + vbQuestion, "View Saved File"
If vbYes Then
Shell "Explorer.exe /root,C:\Users\Jim 2\Desktop\Sample Results", vbNormalFocus
Else
If vbNo Then
Exit Sub
End If
End If
End Sub
Sub ViewSavedFile()
MsgBox "To view your saved file Click Yes and select the one with your name and the latest Date/Time." _
& vbCr & vbCr & "Otherwise Click No" _
, vbYesNo + vbQuestion, "View Saved File"
If vbYes Then
Shell "Explorer.exe /root,C:\Users\Jim 2\Desktop\Sample Results", vbNormalFocus
Else
If vbNo Then
Exit Sub
End If
End If
End Sub