LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy worksheet, rename, merged cell problem??


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro: Copy a worksheet and rename it to a specified value mitch Excel Discussion (Misc queries) 2 February 16th 09 05:43 PM
Copy worksheet and rename sheet Ernst - EXE Graphics Excel Discussion (Misc queries) 4 July 25th 08 01:18 PM
how do i link merged cells to a merged cell in another worksheet. ibbm Excel Worksheet Functions 3 April 27th 06 11:40 PM
Rename a worksheet after copy... Cathy W[_2_] Excel Programming 3 March 8th 06 06:51 PM
Worksheet copy with rename Doug Broad[_4_] Excel Programming 6 March 3rd 06 02:57 PM


All times are GMT +1. The time now is 07:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"