Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Copy Without Code

Sheet1 in a workbook has code behind it. Is there any way to create a copy
of that worksheet in the workbook and not have the code go with it?

--
Bill @ UAMS
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Copy Without Code

Hi,

Put this in a general module and it will copy the active sheet to a new
sheet with (copy) as an extension

Sub MakeCopy()
myname = ActiveSheet.Name
Application.DisplayAlerts = False
Sheets.Add().Name = ActiveSheet.Name & "(Copy)"
Worksheets(myname).UsedRange.Copy _
Destination:=Worksheets(myname & "(Copy)").Cells(1, 1)
Application.DisplayAlerts = True
End Sub

Mike

"BillCPA" wrote:

Sheet1 in a workbook has code behind it. Is there any way to create a copy
of that worksheet in the workbook and not have the code go with it?

--
Bill @ UAMS

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 101
Default Copy Without Code

Thank you, sir! I made some minor modifications, but that gave me what I
needed.

--
Bill @ UAMS


"Mike H" wrote:

Hi,

Put this in a general module and it will copy the active sheet to a new
sheet with (copy) as an extension

Sub MakeCopy()
myname = ActiveSheet.Name
Application.DisplayAlerts = False
Sheets.Add().Name = ActiveSheet.Name & "(Copy)"
Worksheets(myname).UsedRange.Copy _
Destination:=Worksheets(myname & "(Copy)").Cells(1, 1)
Application.DisplayAlerts = True
End Sub

Mike

"BillCPA" wrote:

Sheet1 in a workbook has code behind it. Is there any way to create a copy
of that worksheet in the workbook and not have the code go with it?

--
Bill @ UAMS

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
Help With VBA Copy Code CribbsStyle Excel Programming 6 January 11th 08 10:16 PM
Got the Copy/Cut Code But what is the Paste Code Corey Excel Programming 7 July 7th 06 02:23 PM
Help with COPY code JVLin Excel Discussion (Misc queries) 0 March 6th 05 03:33 PM
vba copy code Paul Excel Programming 1 February 13th 05 03:28 PM
Code to copy range vs Copy Entire Worksheet - can't figure it out Mike Taylor Excel Programming 1 April 15th 04 08:34 PM


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