PC Review


Reply
Thread Tools Rate Thread

Copy Without Code

 
 
BillCPA
Guest
Posts: n/a
 
      30th Jul 2008
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 With Quote
 
 
 
 
Mike H
Guest
Posts: n/a
 
      30th Jul 2008
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 With Quote
 
BillCPA
Guest
Posts: n/a
 
      30th Jul 2008
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy all code to file or print all code cp2599@yahoo.com Microsoft Access Forms 2 28th Apr 2009 10:04 PM
VBA code does not copy and paste to next row for each zip code Miguel Microsoft Excel Programming 5 14th Nov 2008 03:13 PM
Got the Copy/Cut Code But what is the Paste Code Corey Microsoft Excel Programming 7 7th Jul 2006 02:23 PM
vba copy code Paul Microsoft Excel Programming 1 13th Feb 2005 03:28 PM
Code to copy range vs Copy Entire Worksheet - can't figure it out Mike Taylor Microsoft Excel Programming 1 15th Apr 2004 08:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:04 PM.