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?
![]() |
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?
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.
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.Code:Workbooks.Add
Sheets.Add
But what's the maximum number of tabs? Or recommended for the average computer?
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 07:02 AM. |