Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 390
Default Copy a sheet and all formats to a new sheet

I would like to make a macro to copy a sheet to a new sheet. I would like to
include all formats, print areas page setup etc... including a macro button.
I recorded the following. This works except for the button. ANy help??


Sub Macro5()
'
'
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Copy a sheet and all formats to a new sheet

Maybe Sub Macro1()
Sheets("Sheet1").Select
Sheets("Sheet1").Copy
End Sub

Also, right-click the button format Control Properties Move and Size
with Cells.

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Don Guillett" wrote:

Something wrong with this??

Sub copysht()
Sheets("Current Loan Analysis").Copy After:=Sheets(Sheets.Count)
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Bill" wrote in message
...
I would like to make a macro to copy a sheet to a new sheet. I would like
to
include all formats, print areas page setup etc... including a macro
button.
I recorded the following. This works except for the button. ANy help??


Sub Macro5()
'
'
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





Reply
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
Auto copy cell data from source sheet to another wrkbook sheet IVLUTA Excel Programming 2 June 2nd 09 05:07 PM
Copy/Paste Values & Formats from each Sheet & Book in Folder A to B. u473 Excel Programming 0 November 25th 07 02:25 PM
Help: auto-copy entire rows from 1 sheet (based on cell criteria) to another sheet. bertbarndoor Excel Programming 4 October 5th 07 04:00 PM
copy a sheet with all formats - column widths, etc? Rich Excel Programming 2 April 26th 05 09:10 PM
relative sheet references ala sheet(-1)!B11 so I can copy a sheet. RonMc5 Excel Discussion (Misc queries) 9 February 3rd 05 12:51 AM


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