+ Reply to Thread
Results 1 to 6 of 6

Copy Data from Database to Input Sheets Using Userform Selection

  1. #1
    Forum Contributor
    Join Date
    07-13-2014
    Location
    Three Rivers
    MS-Off Ver
    365
    Posts
    127

    Copy Data from Database to Input Sheets Using Userform Selection

    Hi,

    Currently I have a button in the database (DB) sheet that will transfer the active row data in the DB to the input sheets.

    What I would like to do instead is to do that via the userform - so when I to select a "student" in my userform (Resultbox which displays all students when you click the All Students button) and click the Load Student Info button then it will copy the data of that specific student (refering to student number displayed in ProID box) from the DB with same student number in the DB to sheets "Input 1" and "Input 2" and then unload the userform and open "Input 1" sheet.

    I have attached the workbook for reference.

    Thanks

  2. #2
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: Copy Data from Database to Input Sheets Using Userform Selection

    Paste the code in, only needs the selection from the listbox - activates on the mousebutton_up event.
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    07-13-2014
    Location
    Three Rivers
    MS-Off Ver
    365
    Posts
    127

    Re: Copy Data from Database to Input Sheets Using Userform Selection

    Quote Originally Posted by torachan View Post
    Paste the code in, only needs the selection from the listbox - activates on the mousebutton_up event.
    Hi torachan, thanks but this is not going to work for me, I really do need it to work when I press the button.

  4. #4
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,304

    Re: Copy Data from Database to Input Sheets Using Userform Selection

    Is this the long way round you want it to work.
    First select in the listbox then press the Load Student Info button to load the two sheets

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Copy Data from Database to Input Sheets Using Userform Selection

    Yep...One database sheet, One Userform is solution....
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  6. #6
    Forum Contributor
    Join Date
    07-13-2014
    Location
    Three Rivers
    MS-Off Ver
    365
    Posts
    127

    Re: Copy Data from Database to Input Sheets Using Userform Selection

    Quote Originally Posted by torachan View Post
    Is this the long way round you want it to work.
    First select in the listbox then press the Load Student Info button to load the two sheets
    Haha yes that is exactly what I need to happen - the long way - thanks

    How would the code work to rather have the
    Please Login or Register  to view this content.
    section all in a module that could the be called up to run, like I have in Module 2? Maybe Use Module 3 for this section of code.

    The reason I say this is that this workbook shared here only has these 17 entries but my actual project workbook has over 750 entires that need to load and I am not sure that it is best practice to put all 750 of these
    Please Login or Register  to view this content.
    entries into the userform code?

+ 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. Userform Code Required to Control Data between Database and Input Sheet
    By Rudidw in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-28-2020, 01:15 AM
  2. Input rows multiple times depending on selection - Database
    By erikavb04 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-30-2015, 02:23 PM
  3. Userform, Search, copy an paste data from a userform database to another sheet.
    By masro in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-15-2015, 02:42 PM
  4. Multiple Users input data using Excel Userform to a Common Access Master Database
    By eummagic in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-08-2014, 01:45 AM
  5. Using a UserForm to call different sheets and input the data upon a selection.
    By seansimi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-12-2013, 10:07 PM
  6. Creating a macro that will copy data from an input form to an Invoice database
    By uqwee in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-10-2013, 09:07 AM
  7. Input data to different sheets with a UserForm
    By asyamonique in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-29-2008, 01:42 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