+ Reply to Thread
Results 1 to 3 of 3

Add or unhide extra input fields at runtime (Enter Table of Contents v2)

  1. #1
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Add or unhide extra input fields at runtime (Enter Table of Contents v2)

    I am working on a hobby project and have run into a problem that should be simple to solve - but I can't seem to wrap my head around a solution.

    I have uploaded an extract of the project. When you click on "Run Test", it will display a userform for the end user to key in the details of Table of Contents (Chapter number followed by page number).

    One small thing is bugging me - I don't like how many inputs appear. It looks messy.

    I would prefer it start with a set number (say 16 pairs) and then, as the user nears the last visible field, it will automatically add (or unhide) an extra pair of input fields. (Or perhaps add/unhide an extra 2-3 pairs - if only to avoid the visual effect of repeated 'pop in's' on each pair entered after the 16th)
    Attached Files Attached Files
    *******************************************************

    HELP WANTED! (Links to Forum threads)
    Trying to create reusable code for Custom Events at Workbook (not Application) level

    *******************************************************

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Add or unhide extra input fields at runtime (Enter Table of Contents v2)

    I don't fully appreciate the purpose of the userform, but instead of having multiple chapter\page number input boxes, consider having just two input boxes, a listbox, and three buttons; add, edit, delete. The idea being the user inputs a chapter\page, clicks ADD and it puts the entries in a listbox. The user then "builds" the list of entries in the listbox. After the list is created, then clicks "Submit".
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: Add or unhide extra input fields at runtime (Enter Table of Contents v2)

    Quote Originally Posted by AlphaFrog View Post
    I don't fully appreciate the purpose of the userform
    The userform is used to display an image to the end user. The image being a scanned page of a table of contents. The user then reads the image and manually keys in the chapter numbers and their accompanying page numbers. Upon clicking submit, this data is returned as an array. The calling function then uses the array to: 1. create new subfolders (named for the chapters) and 2. file all scanned pages into these subfolders (using the page numbers to separate the images into groups of separate chapters)

    (Note I am giving an over-generalised summary of what this part of the process is doing. It is more complex than what I have described above. For example, there is a check to detect if there is any offset between the scan numbers and the page numbers as recorded in ToC. However that is irrelevant for the purpose of the threads question)

    Quote Originally Posted by AlphaFrog View Post
    instead of having multiple chapter\page number input boxes, consider having just two input boxes, a listbox, and three buttons; add, edit, delete. The idea being the user inputs a chapter\page, clicks ADD and it puts the entries in a listbox. The user then "builds" the list of entries in the listbox. After the list is created, then clicks "Submit".
    Interesting suggestion. After thinking it over, I would prefer to keep using the current input method. No offence. I would find it quicker to enter that way. (i.e. Enter the first chapter, tab once then enter each page number (followed by the down key). Instead of go back and forth between the input boxes and Add/Edit/Delete buttons)

+ 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. [SOLVED] Auto generated input text boxes on specialised user form (Enter Table of Contents)
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-18-2019, 09:57 PM
  2. Help with Pivot table macro to hide/unhide pivot fields
    By indigo7 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-05-2014, 11:39 AM
  3. Excel Table of Contents: Hide/Unhide Worksheets
    By kcowan86 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-10-2013, 05:51 PM
  4. Hide/unhide cells when expanding/collapsing pivot table fields
    By charlieee in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-30-2013, 10:55 AM
  5. Pivot table creates extra data in fields
    By Michael.H. in forum Excel General
    Replies: 2
    Last Post: 06-18-2009, 11:59 AM
  6. Pivot Tables and extra fields
    By dynek in forum Excel General
    Replies: 0
    Last Post: 03-11-2008, 10:12 AM
  7. Adding extra values in numerous fields
    By manny1975 in forum Excel General
    Replies: 3
    Last Post: 09-27-2007, 11:56 AM

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