This is the Workbook tag.


Excel icon

Add and return Excel.Worksheet references in VBA

The Workbooks.Open Method creates a new workbook, adds it to the Workbooks Collection, and returns a Workbook Object which can be set to an object reference. i.e.

Sub TestWorkbookAdd()

Dim wkbks As Excel.Workbooks
Dim wkbk As Excel.Workbook

Set wkbks = Excel.Workbooks
Set wkbk = wkbks.Add

End Sub

From Excel Help:

Creates a new workbook. The new workbook becomes the active workbook. Returns a Workbook object.

Continue Reading »

Excel School