Mega Code Archive
Categories
/
VisualBasic Script
/
Excel
In most cases you can avoid using the worksheet Index property
Sub InsertChartsBeforeWorksheets2() Dim myWorksheet As Worksheet For Each myWorksheet In Worksheets Charts.add Before:=myWorksheet Next myWorksheet End Sub