+ Reply to Thread
Results 1 to 2 of 2

Reverse userform use

  1. #1
    Registered User
    Join Date
    01-09-2017
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2016
    Posts
    15

    Reverse userform use

    So, I really want to take data from a source spreadsheet, and have it auto fill out a user form, then save that user form as an individual file.

    I have 300+ rows of data, each needing to be entered onto a form with 10 questions. Each form then needs to be saved as it's own individual document.

    Everything I'm finding on the internet is the other way around, people want to fill out a form and have that info populated onto a spreadsheet, but I have the data, I NEED the forms.

    Attached is the source form, with vba to export each line to its own file, but I need help programming it to fill out and save in the user form format.


    I also have to be honest, I know DIDDLY about vba/code writing. Like squat. I'm attempting to build the equivalent of the Eiffel tower with the skills of a bird house builder. I'm a google expert, and that's the only reason I've been able to get this far.

    Any help/direction is greatly appreciated more than you know.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    07-01-2018
    Location
    Adelaide, South Australia
    MS-Off Ver
    Office 365, & Excel 2016 on windows 10, & 14.7 for mac, & Excel 2015 for mac
    Posts
    157

    Re: Reverse userform use

    I generally don't manually program form controls anymore. I just write an address into each form control's tag value, then write a macro to read the controls.
    As you will mostly likely have a number of controls like labels and such that will NOT be filled in this way I generally include verification string like "_Y" on the end

    With this scheme, I can use any address scheme I want, and can add all kinds of code behaviour controls into the tag line.

    As a simple version for you, I made one sub where you would simply give the sheet col reference as a letter. Hence for control you want to fill in from column B, you would edit the tag line to "B_Y"

    In the second sub, I made a version to use table headers, hence a control filling from header "Call Data" would get the tag value "Call Data_Y"

    NB I use sheet code names in my code. Your tab "Data" is Sheet1, while your "Sheet 1" is Sheet2. I hope this doesn't cause confusion, but code names is mush less troublesome method that doesn't break when you edit your sheet names.
    Please Login or Register  to view this content.
    Note that if you change the name of your table, you'll need to edit the code. However the tagline technique can be adapted to include table names or any other variable you want to work with.

    I hope that this help.
    Last edited by truk2; 02-02-2020 at 11:52 PM. Reason: Spotted copy error in 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. Replies: 7
    Last Post: 11-27-2018, 08:02 PM
  2. [SOLVED] Reverse combobox and textbox dependency in Userform
    By excelconditional in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-21-2017, 02:26 AM
  3. Reverse for each cell in range loop with userform? Is this possible?
    By PENGUIN88 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 07-26-2016, 06:55 PM
  4. [SOLVED] Userform displays saved recorded dates with month and date in reverse order
    By chin67326 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-21-2015, 08:34 AM
  5. UserForm - How to retain wrksht data in userform and reverse
    By JasonRay in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-08-2013, 05:32 PM
  6. Using a string to reverse fill Textboxes on a userform
    By VBA Noob in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-27-2009, 03:27 PM
  7. Reverse Userform
    By oberon.black in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-14-2005, 07:15 PM

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