+ Reply to Thread
Results 1 to 4 of 4

Using VBA to extract Student's data

  1. #1
    Registered User
    Join Date
    12-10-2012
    Location
    france
    MS-Off Ver
    Excel 2007
    Posts
    2

    Question Using VBA to extract Student's data

    I have a worksheet containing students' data as follow:
    (in row) Number, Student ID, Name, Birthday, average score, score of sub 1, score of sub 2, score of sub 3.

    Now I have to create (in VBA) a combobox for users to choose an ID, then a Msgbox will appear with the results of Name, Avg Score and Scores of each sub.

    But im' beginner in VBA, can anyone help me the code, or how to make it

    Thks alot.

  2. #2
    Valued Forum Contributor
    Join Date
    08-14-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    573

    Re: Using VBA to extract Student's data

    Try this code. I assumed your data is in columns A to G and combo box in I1.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    12-10-2012
    Location
    france
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Using VBA to extract Student's data

    Sorry I didnt explain well, I dont use combobox in excel but use a userform in VBA, then choose the button "combobox", therefore, there's no combobox in I1.

    Can u help me one more time, thks alot :D

  4. #4
    Valued Forum Contributor
    Join Date
    08-14-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    573

    Re: Using VBA to extract Student's data

    Then try the code this way. Target = Userform1.Combobox1.value to get value from combo box. Userform1 is your userform name and combobox1 is your combo box name. Then use this part in your code.
    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