+ Reply to Thread
Results 1 to 4 of 4

Userfrom next/back button to toggle

  1. #1
    Registered User
    Join Date
    07-25-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    7

    Userfrom next/back button to toggle

    Hi Guys,

    I would be really grateful if someone could tell me how to create a user form to toggle between text in a label box. Let me elaborate more;

    What I want to achieve is something like a questionnaire.

    In the user form, there will be a label box (label1), a text box(Textbox1) and two command buttons, one functions as a "Next" and the other as "Back" (CommandButton1 and CommandButton2 respectively).

    There will be a question in the label box (question 1) and user is supposed to answer for it in the text box (TextBox1) in front (answer 1). Once done, user will click on "Next" command button. When user click this "Next" button, I want the question appearing on the label box to be changed to the second question (question 2) and then user can answer (answer 2) to that question in the text box (TextBox1). In any case if the user wants to go to the previous question, can simply click the "Back" command button ("Command Button 2") and the previous question would be displayed in label box.

    Now, the answers that the user key-in in the text box (Textbox1) should be recorded in a excel worksheet (Sheet1) in a column in vertical direction. Meaning to say that if the answer to the "question 1" goes to cell "A1" and the answer to the "question 2" goes to cell "A2" and so on.

    I hope the question is clear and sincerely hope somebody would help me with this or direct me to somewhere (a website, forum may be) where I can find some guidance on how to solve this.

    Thank you so much in advance guys and thank you so much for taking time to read and understand my question. Please reply to this thread if you need any further clarifications etc...

    Thanks a million

    Yours Sincerely,
    Dev
    Last edited by Dev123; 07-26-2012 at 03:42 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Userfrom next/back button to toggle

    Questions & answers should be on the Forum not emailed. Also, posting your email address invites spam!

    Where are the questions stored

    This might help

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    07-25-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Userfrom next/back button to toggle

    Hi RoyUK,

    Thanks so much for the code. It works perfect in forward, however, there is no code to go backward (CommandButton2). Could you please help me with it too.
    Regarding the question you asked about the question bank, if I can store the questions in a worksheet (Sheet2), in cells along a column (A1, A2, A3 ....) would it be possible to get it into the label1?

    And also, thanks alot for the advice too. I have removed my e mail address from the thread.

    Thank you so much.

    Yours Sincerely,
    Dev

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Userfrom next/back button to toggle

    The easiest option would be to store the questions on a worksheet.
    Please Login or Register  to view this content.
    Attach an example workbook of how you would have the questions & answers.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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