Creates a new workbook and adds it to the collection, reads the number of workbooks into a variable, and selects all worksheets in the active workbook: : Workbook « Excel « VBA / Excel / Access / Word
Creates a new workbook and adds it to the collection, reads the number of workbooks into a variable, and selects all worksheets in the active workbook:
Sub workbookAdd()
Workbooks.Add
numWorkbooks = Workbooks.Count
Worksheets.Select End Sub