Hiding active workbook programmatically in Excel

Hiding the active workbook is possible with

ActiveWorkbook.Windows(1).Visible = False

You may need to replace ActiveWorkbook with an appropriate reference if the workbook in question is not the active one and/or add a loop like For i = 1 To ActiveWorkbook.Windows.Count if the workbook has multiple windows.

Leave a Comment