Workbook.Activate

Use this function to bring the workbook to the front.

Syntax Parameters Return value
- This function has no parameters. This function does not return a value.

SVB Example

Option Base 1
Option Explicit
Sub Main
    Dim w As Workbook
    Set w = ActiveWorkbook
    'set the pointer to the beginning of the workbook tree
    Dim CurrentItem As WorkbookItem
    Set CurrentItem = w.Root
    'loop until you reach the last node in the workbook tree
    Do While TypeName(CurrentItem) <> "Nothing"
    Set CurrentItem = w.NextItem(CurrentItem)
    'the last node in the workbook tree has been reached.
    If TypeName(CurrentItem) = "Nothing" Then Exit Do
    'if it's a spreadsheet then print it
    If CurrentItem.Type = scWorkbookItemTypeSpreadsheet Then
        CurrentItem.Activate
        w.PrintOut(True, False)
    End If
    Loop
End Sub