S
Simon Lloyd
Hi all, i have some code below that i have put together to copy a
worksheet using the sheet name and some text and the value in A1 i
havent got it to run right the way through yet it stops at the
Selection.PasteSpecial line in the code.....any ideas?
Regards,
Simon
Sub Saveweek()
Dim OriginalSheet
Application.ScreenUpdating = False
Application.EnableEvents = False
OriginalSheet = ActiveSheet.Name
Range("A1:N239").Select
Application.CutCopyMode = False
Selection.Copy
Sheets(OriginalSheet).Select
Sheets.Add
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Columns("A:n").EntireColumn.AutoFit
Application.CutCopyMode = False
ActiveWindow.DisplayGridlines = False
ActiveSheet.Select
ActiveSheet.Name = Sheet.Name & "Starting " & Range("A1").Text
Sheets(OriginalSheet).Select
Range("A1").Select
Application.ScreenUpdating = True
Application.EnableEvents = False
End Sub
worksheet using the sheet name and some text and the value in A1 i
havent got it to run right the way through yet it stops at the
Selection.PasteSpecial line in the code.....any ideas?
Regards,
Simon
Sub Saveweek()
Dim OriginalSheet
Application.ScreenUpdating = False
Application.EnableEvents = False
OriginalSheet = ActiveSheet.Name
Range("A1:N239").Select
Application.CutCopyMode = False
Selection.Copy
Sheets(OriginalSheet).Select
Sheets.Add
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Columns("A:n").EntireColumn.AutoFit
Application.CutCopyMode = False
ActiveWindow.DisplayGridlines = False
ActiveSheet.Select
ActiveSheet.Name = Sheet.Name & "Starting " & Range("A1").Text
Sheets(OriginalSheet).Select
Range("A1").Select
Application.ScreenUpdating = True
Application.EnableEvents = False
End Sub