LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Help copying last sheet and renaming to next consecutive number

I tried the With Sheets part, but maybe I have it in the wrong
place...

Sub CopyLastSheetAndName()
Dim ls As Long
ls = ActiveWorkbook.Sheets.Count
'MsgBox ls
Sheets(Sheets.Count).Copy after:=Sheets(ls)
ActiveSheet.Name = "Rpt #" & ls + 1
Range("i4").Select
ActiveCell.FormulaR1C1 = Now()
With Sheets(ls).Range("d9")
.Value = Value + 1
End With
Range("D10:G10").Select
ActiveWindow.ScrollColumn = 2

Range("T15:T56").Select
Selection.Copy
ActiveWindow.SmallScroll Down:=-15
Range("S15").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
ActiveWindow.ScrollColumn = 5

Range("A14:J21").Select
Application.CutCopyMode = False
Selection.ClearContents
ActiveWindow.SmallScroll Down:=42
Range("P75:P79").Select
Selection.Copy
Range("L75:L79").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("M75:O79").Select
Application.CutCopyMode = False
Selection.ClearContents
End Sub



 
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
Printing Consecutive Number (One spreadsheet) on Each Sheet Scott Senffner Excel Programming 5 March 11th 08 08:08 PM
Copying and Renaming New Sheet T. Jenkins Excel Programming 4 November 14th 07 11:58 PM
Copying and renaming a file Craig Excel Discussion (Misc queries) 1 February 24th 05 10:47 PM
copying and renaming sheets Jan Eikeland Excel Programming 9 December 23rd 03 07:55 PM
Copying and renaming worksheets John Young Excel Programming 1 December 17th 03 01:46 AM


All times are GMT +1. The time now is 02:26 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"