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 macro to select next and rename

I want the Macro to do this only if the sheet is not the last sheet in the workbook. It is knind of meesy, but is what I have so far

Sheets("Sheet1").Selec
Range("E2").Selec
Selection.Cop
Sheets("Summary").Selec
Range("a34").Selec
Selection.End(xlToRight).Offset(0, 1).Selec
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks
:=False, Transpose:=Fals
Selection.Offset(1, 0).Selec
Sheets("Engine").Selec
Range("D65510:g65536").Selec
Application.CutCopyMode = Fals
Selection.Cop
Sheets("Sheet1").Selec
Range("D65510").Selec
ActiveSheet.Past
Range("F65510:f65536").Selec
Application.CutCopyMode = Fals
Selection.Cop
Sheets("Summary").Selec
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks
:=False, Transpose:=Fals
Sheets("Sheet1").Selec
Sheets("Sheet1").Name = Format(Range("E2").Value, "yyyymmdd"
Sheets("Summary").Selec
Range("a34").Selec

End Su

This workbook is updated weekly by adding additional sheets (Sheet1, (2), (3), etc). I don't want to manually rename each new sheet to update the workbook. The last sheet in the WB is named Caboose and it is needed (I think) for some SUM(Engine:Caboose) formulas

Thanks in advance for the help.
 
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
Rename of sheets by macro Harshad[_2_] Excel Discussion (Misc queries) 4 October 17th 08 01:09 PM
Rename Macro rmpete Excel Discussion (Misc queries) 3 February 11th 06 10:24 PM
Can I rename a directory using a macro Harvey[_3_] Excel Programming 2 February 6th 04 01:49 PM
rename file macro dtroupe Excel Programming 1 December 5th 03 12:50 AM
MACRO TO RENAME SHEET ! Jay Dean Excel Programming 1 October 17th 03 08:58 AM


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

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

About Us

"It's about Microsoft Excel"