LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 390
Default Keep formating from old sheet in the new sheet

I recorded a macro and here is what I got

Sub Macro5()
'
' Macro5 Macro
'

'
Sheets("Current Loan Analysis").Select
ActiveSheet.Unprotect
Sheets("Current Loan Analysis").Select
ActiveSheet.Buttons.Add(1082.25, 34.5, 125.25, 80.25).Select
Sheets("Current Loan Analysis").Copy After:=Sheets(2)
Sheets("Current Loan Analysis (2)").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Sheets("Current Loan Analysis").Select
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False
Range("J1").Select
End Sub

The problem is - Sheets("Current Loan Analysis").Copy After:=Sheets(2)

next time there will be more sheets. I just want it added to the end. Also
I want to include the macro button that runs this macro. Will this work?





"Dave Peterson" wrote:

It sounds like you're creating a new sheet, then copying the data from the other
sheet.

How about copying the original sheet.

Record a macro when you do:
edit|Move or copy sheet (check copy)

and you'll see the code.



JorgeG.ACT wrote:

I have a macro which copies time sheets from the old/current sheet to a new
sheet.

I haave found that headers and other formating aspects of the sheet such as
row width and the page scaling is not maitained in the new sheet.

Is there a simple way of achieving this without resorting to using excels
macro recording facility?

Regards
Jorge


--

Dave Peterson

 
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
FORMATING ONE SHEET TO MOVE U TO ANOTHER A. Gray Excel Worksheet Functions 0 May 29th 08 03:59 PM
selective sheet formating Trefor Excel Programming 3 November 25th 05 11:28 PM
Sheet Group & Formating in VBA Phatchef24[_3_] Excel Programming 1 August 23rd 04 07:51 PM
Inserting a row in sheet A should Insert a row in sheet B, removing a row in Sheet A should remove the corresponding row in sheet B Hannes Heckner Excel Programming 1 March 5th 04 09:10 AM
formating sheet Node321 Excel Programming 2 September 19th 03 12:56 PM


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