Make user answer Yes/No on instruction page before moving to another sheet

blp1047

New Member
Joined
Jun 27, 2017
Messages
6
Hello all,

I am at a loss when it comes to VBA. I have googled, but not been able to find the ideas I am looking for or to how to make it work. I am running a Mac 10.14.3 and Office 365.

Here is what I am trying to accomplish:

1) I want the user to read the instructions page, then click a proceed button at the end of the instructions.

2) Once they click proceed, I want the MsgBox to ask, "I have read the instructions" or "I have not read the instructions".

3) If answer if Yes, allow the user to go onto worksheet 2 and 3........If No, make the user stay on the instruction page.


I have been able to get the file to automatically open to the instructions page, but that is as far as I have made it. If anyone can give me ideas, that would be awesome. I am up for learning, I just don't know where to start.


Thank you all very much.
 

Some videos you may like

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

My Aswer Is This

Well-known Member
Joined
Jul 5, 2014
Messages
16,882
Office Version
  1. 2013
Platform
  1. Windows
Re: Lost in VBA Land.........Need to make user answer Yes/No on instruction page before moving to another sheet

So your going to put a Button on every sheet that the user must click asking the question.

And what would stop a user from just clicking on the sheet tab to go to the next sheet?

And if I were a user and I just wanted to go to the next sheet without reading the instruction why not just say Yes.
 

blp1047

New Member
Joined
Jun 27, 2017
Messages
6
Re: Lost in VBA Land.........Need to make user answer Yes/No on instruction page before moving to another sheet

I understand what you are saying and I never thought about it in that way. I guess, in my little world, was that if the user clicked Yes, it was on them if they did not complete what they were supposed to, etc.

Do you have any suggestions? I am trying to think of a different way to accomplish something like that, but maybe I am reaching too far.
 

My Aswer Is This

Well-known Member
Joined
Jul 5, 2014
Messages
16,882
Office Version
  1. 2013
Platform
  1. Windows
Re: Lost in VBA Land.........Need to make user answer Yes/No on instruction page before moving to another sheet

Here is a script you can use which will do what you wanted.

You could put this script in a module. Then create a shape and assign the script to the shape.

Then copy the shape and paste this button in each sheet.

But now to be sure the user had read the instruction the only way I would know would be to ask them a question about the instructions and see if they answer the question correctly.

Code:
Sub Next_Sheet()
'Modified  3/22/2019  12:09:45 AM  EDT
On Error GoTo M
Dim ans As String
Dim r As Long
r = ActiveSheet.Index
ans = MsgBox("Did you read instructions", vbYesNo, "My answer is")
If ans = vbYes Then Sheets(r + 1).Activate
If ans = vbNo Then MsgBox "Keep Readiing"
Exit Sub
M:
MsgBox "There are no more sheets to Goto"
End Sub
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,109,551
Messages
5,529,474
Members
409,884
Latest member
Msinmath
Top