Sub workbook() Dim myWorkbook As Workbooks Set myWorkbook = ActiveWorkbook With myWorkbook 'actions here End WithEnd Sub