Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Spreadsheets (https://www.askmehelpdesk.com/forumdisplay.php?f=395)
-   -   Create New Workbook Macro (https://www.askmehelpdesk.com/showthread.php?t=375705)

  • Jul 14, 2009, 06:21 PM
    adalton
    Create New Workbook Macro
    I need to create a macro that creates a certain number of sheets in a workbook then creates a new workbook. What would you recommend be the maximum number of sheets in the workbook and what is the code to create a new workbook?
  • Jul 14, 2009, 08:57 PM
    JBeaucaire

    Creating a new workbook and new worksheets is a tiny little line of code. Each time one of these lines of code execute, the newly created book/sheet is also now the activebook/sheet.
    Code:

        Workbooks.Add
        Sheets.Add

    Your question is answered by the code above, but I imagine you actually now have about 20 new questions. So, rethink your needs, write them all down IN DETAIL in your next post, and I can offer a more useful code to meet your real need.
  • Jul 15, 2009, 03:12 PM
    adalton

    But what's the maximum number of tabs? Or recommended for the average computer?
  • Jul 15, 2009, 06:04 PM
    JBeaucaire

    No maximum. Depends solely on your memory and organization.

    On a personal note of opinion, any workbook that has numerous sheets should be reevaluated for a more efficient design.

    1) What's the purpose of 100s of individual sheets?
    2) How can you effectively navigate sheets of this QTY?
    3) Would you be better served with ONE massive database sheet and a few sheets designed to pull in specific data "on demand"?

  • All times are GMT -7. The time now is 03:06 AM.