Hi
I have a worksheet that I often duplicate (copysheet) within a book.
I need a macro to create three views for each new worksheet.
I tried but (see below) it continues to reset the same name .
How can I get the line where the viewname is named, to say insert the tab name and "A" for the first view "B" for the second, etc.
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 13/09/2002 by Kade
'
'
Range("A1:G17").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$G$17"
Range("A1").Select
ActiveWorkbook.CustomViews.Add ViewName:="sht3A", PrintSettings:=True, _
RowColSettings:=True
ActiveWindow.SmallScroll ToRight:=7
Range("H1:N21").Select
ActiveSheet.PageSetup.PrintArea = "$H$1:$N$21"
Range("H1").Select
ActiveWorkbook.CustomViews.Add ViewName:="sht3B", PrintSettings:=True, _
RowColSettings:=True
End Sub
Any other solutions greatfully accepted
thanks Kade
I have a worksheet that I often duplicate (copysheet) within a book.
I need a macro to create three views for each new worksheet.
I tried but (see below) it continues to reset the same name .
How can I get the line where the viewname is named, to say insert the tab name and "A" for the first view "B" for the second, etc.
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 13/09/2002 by Kade
'
'
Range("A1:G17").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$G$17"
Range("A1").Select
ActiveWorkbook.CustomViews.Add ViewName:="sht3A", PrintSettings:=True, _
RowColSettings:=True
ActiveWindow.SmallScroll ToRight:=7
Range("H1:N21").Select
ActiveSheet.PageSetup.PrintArea = "$H$1:$N$21"
Range("H1").Select
ActiveWorkbook.CustomViews.Add ViewName:="sht3B", PrintSettings:=True, _
RowColSettings:=True
End Sub
Any other solutions greatfully accepted
thanks Kade