Microsoft Office Tutorials and References
In Depth Information
Set the Default Number of Worksheets for New Workbooks
Chapter 2: Making It Easier to Manage Workbooks
The Excel Options dialog
box appears.
3 On the General tab, click
this spin box to specify
the number of
worksheets you want in
each new workbook.
3
4 Click OK.
Each time you create a
new workbook, Excel
now includes the number
of worksheets that you
specified.
4
Try This!
What if you want to determine the number of sheets in each new workbook as you
create your workbooks, rather than as a general rule? For example, a simple loan
amortization model might require just a single worksheet, whereas a company budget
workbook might require a dozen worksheets.
The following macro solves this problem by enabling you to specify the number of
sheets you want in each new workbook.
Sub NewWorkbookWithCustomSheets()
Dim currentSheets As Integer
With Application
currentSheets = .SheetsInNewWorkbook
.SheetsInNewWorkbook = InputBox( _
“How many sheets do you want“ & _
“in the new workbook?”, , 3)
Workbooks.Add
.SheetsInNewWorkbook = currentSheets
End With
End Sub
For more information about adding a macro to Excel, see Chapter 11.
 
Search JabSto ::




Custom Search