+ Reply to Thread
Results 1 to 11 of 11

Auto Create New Tabs (Worksheet)

  1. #1
    Registered User
    Join Date
    03-29-2007
    Posts
    63

    Auto Create New Tabs (Worksheet)

    I would need some helps to create a VB code that can faciliate the process below.

    I have a spreadsheet with two Tabs, Say Tab-A and Tab-B

    Tab-A contains data from range A1:A100
    Tab-B is just a form.

    I would like to create copies of the form (Tab-B), based on number of data on Tab A. Thus, in this example, there will be 100 copied of Tab-B created, the name of each Tab should be the same as the Cell A1, A2... A100. And I also need the value of Cell A1...A100 on Tab-A copied to the Cell A1 of each new tab created.

    Thanks all for your helps...

  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 would you need 100 copies? There must be a more efficient way of doing this.
    Hope that helps.

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

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    03-29-2007
    Posts
    63
    I need to create invoices with each of the date on Tab-A.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Can you attach the workbook?

  5. #5
    Registered User
    Join Date
    03-29-2007
    Posts
    63
    RoyUK,

    Attached is the file.. Thanks..
    Attached Files Attached Files

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Not much to gon from the example, but I would have all the invoice data on the same sheet as the dates in a table. Then use VLOOKUP to populate the form so that you only need one form

  7. #7
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717
    Is this something helpful to you
    Attached Files Attached Files
    Last edited by Shijesh Kumar; 12-01-2008 at 10:36 AM.

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Code has a Mistype error, it should be.

    Please Login or Register  to view this content.
    However, you could do a similar thing without using VBA - using VLOOKUP & Data Validation

  9. #9
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717
    The error was due to data.

    So, if unit and total is entered as String then it will throw that error... I generally don't add error handling in my sample codes
    So depending upon the actual datatype it can be changed
    Last edited by Shijesh Kumar; 12-01-2008 at 10:54 AM.

  10. #10
    Registered User
    Join Date
    03-29-2007
    Posts
    63
    I am not sure if I described properly of what the code should be. Attached is a sample of I need.

    Bascially, the code will create new Tabs based on the data on the first Tab (which will be used as the name of the new Tabs created).

    Thanks...
    Attached Files Attached Files

  11. #11
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    What we have bothy tried to point out is that you don't need to create a sheet for each date, you will end up with trying to locate a particular sheet out of 100. Whereas with our suggestions you just create the sheet as required.

+ 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