+ Reply to Thread
Results 1 to 5 of 5

Creating new sheets from master list with VBA

  1. #1
    Registered User
    Join Date
    09-01-2007
    Posts
    2

    Creating new sheets from master list with VBA

    If this has already been answered, feel free to refer me to the correct post---I could not find it through a search.

    The following question will sound very similar to relational database design, where creating a new record in a parent table creates a detailed record in a child table. I am doing this in Excel because the end-users work almost exclusively in Excel and would like to integrate this with their other Excel data.

    Assume I have a "Master List" sheet that contains summary information. Column A in this "Master List" contains a unique numerical value for each line. I would like a new worksheet created from a template each time I add another line, with the value in Column A hyper linked to the new tab.

    For example, if I enter a value into A7, I would like Excel (VBA) to create a new worksheet (from a predefined template) in the same workbook, with the worksheet tab named after the value in A7 and the value in A7 hyperlinked to the new sheet.

    Any ideas???

    Many thanks in advance,
    Joel

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Why?

    A database does not create a separate sheet for each record. You should store all data in one worksheet, with relevant Columns/Fields from which various reports can be created using AutoFilter, Database Functions & PivotTables.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Why?

    A database does not create a separate sheet for each record. You should store all data in one worksheet, with relevant Columns/Fields from which various reports can be created using AutoFilter, Database Functions & PivotTables.

    Your method would quickly create a unwieldy workbook, bogged down with numerous sheets to navigate and try to find information from.

  4. #4
    Registered User
    Join Date
    09-01-2007
    Posts
    2
    royUK---

    I agree, however, each "record" (row) also has a 10column x 40row checkbox table associated with it. I cannot think of another way to attach a 10 x 40 table to a single row in Excel other than to keep all summary data in the master list, and hyperlink to the 10x40 table in a separate worksheet.

    To add insult to injury, they want each record to print one to a page.

    Whadya think? Should I just tell them to learn to use a database?

  5. #5
    Forum Contributor
    Join Date
    07-05-2007
    Location
    Lexington, MA
    Posts
    302

    Creating your own database system, if you dare

    In the relational spirit, you could store the primary records in Sheet1 with an index into Sheet2 where the 10 row by 40 column associated data is stored for all primary records.

    A Sheet3 for printing can be assembled with VBA as needed.

    They should learn to use a database, because you will be writing a database system in VBA before you are finished. (smile)

    Or equivalently, keep the data in a real database and transfer what is needed to an Excel workbook for the clients to use and alter, then update the main data. This also has problems, but avoids a lot of the organizational work that the database provides.
    Last edited by FrankBoston; 09-01-2007 at 12:26 PM.
    FrankBoston is the pen name for Andrew Garland, Lexington MA

+ 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