Add Yes/No stops in VB script

N

Neall

I have a print to PDF button I created to print off the tally sheet, but
before they tally sheet gets PDF'd I want to ask 3 or 4 questions to the user

basically the user will click "print to PDF" then I want

Question 1 asked if 'No' move to question 2 if 'yes' exit out of PDF and
highlight cell that needs to be changed

Question2 asked if 'No' move to question 3 if 'yes' exit out of PDF and
highlight cell that needs to be changed

Question3 asked if 'No' continue with the PDF if 'yes' exit out of PDF and
highlight cell that needs to be changed

Any help would be greatly appreciated.

Thanks in advance
 
J

Jacob Skaria

If MsgBox("Click Yes to Exit Yes" & vbCrLf & vbCrLf & _
"Click No to continue to Question 2", vbYesNo) <> vbNo Then Exit Sub
If MsgBox("Click Yes to Exit Yes" & vbCrLf & vbCrLf & _
"Click No to continue with Question 3", vbYesNo) <> vbNo Then Exit Sub
If MsgBox("Click Yes to Exit Yes" & vbCrLf & vbCrLf & _
"Click No to continue with PDF", vbYesNo) <> vbNo Then Exit Sub

If this post helps click Yes
 
N

Neall

Thanks Jacob much appreciated!
--
Neall


Jacob Skaria said:
If MsgBox("Click Yes to Exit Yes" & vbCrLf & vbCrLf & _
"Click No to continue to Question 2", vbYesNo) <> vbNo Then Exit Sub
If MsgBox("Click Yes to Exit Yes" & vbCrLf & vbCrLf & _
"Click No to continue with Question 3", vbYesNo) <> vbNo Then Exit Sub
If MsgBox("Click Yes to Exit Yes" & vbCrLf & vbCrLf & _
"Click No to continue with PDF", vbYesNo) <> vbNo Then Exit Sub

If this post helps click Yes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top