Instead of the obsolete Workbook.ActiveWorksheet property, you should use the Workbook.WindowOptions.SelectedWorksheet property.