Set No of Sheets in new workbook

  • Thread starter Thread starter cornishbloke
  • Start date Start date
C

cornishbloke

Hopefully a quickie for someone ;)

When using the VBA code:

workbooks.add

how do I determine the number of sheets in that newly created workboo
(i.e rather than using the value set in excel's options on eac
individual pc)
 
Application.SheetsInNewWorkbook = 5

Change the number to suit your purposes.
 
Workbooks.Add
cSheets = ActiveWorkbook.Worksheets.Count

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top