Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 -- Simon Lloyd ------------------------------------------------------------------------ Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708 View this thread: http://www.excelforum.com/showthread...hreadid=552545 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro: Copy a worksheet and rename it to a specified value | Excel Discussion (Misc queries) | |||
Copy worksheet and rename sheet | Excel Discussion (Misc queries) | |||
how do i link merged cells to a merged cell in another worksheet. | Excel Worksheet Functions | |||
Rename a worksheet after copy... | Excel Programming | |||
Worksheet copy with rename | Excel Programming |