ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Add Yes/No stops in VB script (https://www.excelbanter.com/excel-programming/428306-add-yes-no-stops-vbulletin-script.html)

Neall

Add Yes/No stops in VB script
 
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
--
Neall

Jacob Skaria

Add Yes/No stops in VB script
 
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
---------------
Jacob Skaria


"Neall" wrote:

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
--
Neall


Neall

Add Yes/No stops in VB script
 
Thanks Jacob much appreciated!
--
Neall


"Jacob Skaria" wrote:

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
---------------
Jacob Skaria


"Neall" wrote:

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
--
Neall



All times are GMT +1. The time now is 01:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com