+ Reply to Thread
Results 1 to 3 of 3

Populating a text area in a user form from an Array???

  1. #1
    Registered User
    Join Date
    08-16-2012
    Location
    Florida
    MS-Off Ver
    Excel 2016
    Posts
    33

    Populating a text area in a user form from an Array???

    Hello everyone,

    I am building a userform for when I am giving an oral quiz with students. I typically have 5 topics to cover for each quiz. There are 8 quizzes total.

    I started playing around with combo boxes for scores, and have a list with a 0-10 scale that I use for each question that works great. Playing off of that success, I built an 8 wide by 5 high array with all of my topics that I cover for all of the quizzes. I then have a combo box for question 1, another for question 2, etc. I just have to click it, and then pull up the topic from the list. It works great, but I got to thinking that it would be nice if I could just say which quiz it was, and it would put the correct question into a text box for me, so that I could spend my time listening instead of clicking, and maybe even be able to edit the topic.

    I go on to process the values into a comment that looks like:

    We discussed Radioactive Decay (10/10),Half life (0/10),Fission and Fusion (10/10),Renewable Energy (5/10), and Biotechnology (5/10)

    My array looks something like:
    Quiz1 Quiz2 Quiz3 Quiz4 Quiz5 Quiz6 Quiz7 Quiz8
    Q1 Q1 Q1 Q1 Q1 Q1 Q1 Q1
    Q2 Q2 Q2 Q2 Q2 Q2 Q2 Q2
    Q3 Q3 Q3 Q3 Q3 Q3 Q3 Q3
    Q4 Q4 Q4 Q4 Q4 Q4 Q4 Q4
    Q5 Q5 Q5 Q5 Q5 Q5 Q5 Q5

    And I want to pull up the correct Q1, Q2, Q3, Q4, and Q5 depending on the Quiz selected from a combo box. I would like the value for each Q to be in its own (if possible editable) text box.

    Does anyone have any ideas for how to pull that off?

    Here is the code I am currently using:

    Please Login or Register  to view this content.
    Last edited by arlu1201; 01-17-2013 at 06:32 AM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Populating a text area in a user form from an Array???

    Is this solved?

    If you solve a problem yourself before anyone else has responded, please take a moment to describe your solution, chances are some other member will benefit.

    Also,

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. If you need more information on how to use them, check my signature below this post.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    08-16-2012
    Location
    Florida
    MS-Off Ver
    Excel 2016
    Posts
    33

    Re: Populating a text area in a user form from an Array???

    Yes, it is solved...Sorry about not posting solution or using code tags.

    I flipped the array the other direction, so that it was 9 tall by 6 wide. (Just because it was easier to enter the info that way for me)
    Replaced combo boxes with text boxes.
    Added a button to start a Vlookup to populate the questions.
    Here is what I added:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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