+ Reply to Thread
Results 1 to 4 of 4

Making a quastionaire - No clicking back

Hybrid View

  1. #1
    Registered User
    Join Date
    09-10-2014
    Location
    holland
    MS-Off Ver
    2013
    Posts
    29

    Question Making a quastionaire - No clicking back

    Hey guys!

    I am making a quastionaire in excel since other programs dont seem to do what i want. Now i have a couple of questions.

    1st - Can i make a click button to make someone go to the next sheet/question
    2nd - How can i make sure someone is not able to click back to the previous sheet
    3rd - Is there a possibility to let someone only look at a sheet for 20 seconds in which it then automatically goes to the next sheet without that person being able to
    go back to this sheet?

    Thanks a lot guys!

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Making a quastionaire - No clicking back

    I assume that you will be using a workbook.

    1. So you can put a button on each sheet to make it move to the next sheet.
    I would increment a named variable each time.

    2. I would put a sheet specific macro on each sheet so that if the user clicks on a tab,
    the macro will take the user to the next sheet in the sequence and no other sheet.

    3. Finally I would use an ontime macro to increment your named variable and move to the next sheet.

    I will create something for you.

  3. #3
    Registered User
    Join Date
    09-10-2014
    Location
    holland
    MS-Off Ver
    2013
    Posts
    29

    Re: Making a quastionaire - No clicking back

    That sounds awesome! if you could show me how that is done that would be awesome!! Thanks a lot Mahmetcik!!!

    If you need my email, its martijn.vanderveldt@hotmail.com

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Making a quastionaire - No clicking back

    This is the sheet specific macro that stops you going back or forward.

    
    Private Sub Worksheet_Activate()
    Sheets(MartinT).Select
    End Sub
    
    NB: The array is the max time on a sheet,
    These are the main macros:

    Option Base 1
    Public MyArray As Variant
    Public MartinT As Integer
    
    Sub Auto_Open()
    Sheets(1).Select
    MyArray = Array(20, 30, 20, 30, 20, 30, 20, 30, 20, 30)
    MartinT = 1
    Application.OnTime Now + TimeValue("00:00:" & MyArray(MartinT)), "ChangeSheet"
    End Sub
    
    Sub ChangeSheet()
    
    MyArray = Array(20, 30, 20, 30, 20, 30, 20, 30, 20, 30)
    
    If MartinT < 1 Or MartinT > 10 Then MartinT = 1
    If MartinT < 10 Then
    MartinT = MartinT + 1
    Sheets(MartinT).Select
    Application.OnTime Now + TimeValue("00:00:" & MyArray(MartinT)), "ChangeSheet"
    Else
    On Error Resume Next
    EndTime = CStr(Time + TimeSerial(0, 0, 5))
    Application.OnTime EarliestTime:=EndTime, Procedure:="ChangeSheet", Schedule:=False
    
    End If
    End Sub
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. When clicking macro button back data is not showing
    By AB95 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-21-2014, 12:15 PM
  2. Change cells back to original conditions by double clicking another cell
    By Bonnister in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-14-2013, 10:21 AM
  3. making stem and leaf back to back diagram
    By masxomas in forum Excel General
    Replies: 2
    Last Post: 05-05-2012, 02:38 PM
  4. Making a button disappear after clicking on it...
    By ssedha in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 04-26-2012, 01:50 PM
  5. Making VBA run without clicking play
    By nmicon in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-15-2009, 03:39 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1