Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 252
Default copy worksheet without code behind

Hi all,

My being developed worksheet layout got ruined since I have some new code in
it , so I want to copy old worksheet without code module behind.

Clara
--
thank you so much for your help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default copy worksheet without code behind

hi,
here is a save range macro i wrote for myself some years back.
but if it is just a one time thing, you can just as easily copy the sheet
and paste it in a new workbook.
Sub mac1SaveRange()

'Macro written by FSt1 4/27/03

Dim cnt As Long
Dim cell As Range
On Error GoTo err1

MsgBox "You have selected range" & Selection.Address
If Selection.Cells.Count = 1 Then
If MsgBox("You have selected only one cell. Continue?????", vbYesNo,
"Warning") = vbNo Then

Exit Sub
End If
End If
cnt = 0
For Each cell In Selection
If Not IsEmpty(cell) Then
cnt = cnt + 1
End If
Next
If cnt = 0 Then
If MsgBox("There is no data in the selected range. Continue?!?!?!?!?",
vbYesNo, "Warning") = vbNo Then
Exit Sub
End If
End If
'ActiveSheet.UsedRange.Select
Selection.Copy
Workbooks.Add
Range("A1").PasteSpecial xlPasteAll
Application.Dialogs(xlDialogSaveAs).Show
err1:
MsgBox ("Need a range to save.")
Exit Sub
End Sub
regards
FSt1

"clara" wrote:

Hi all,

My being developed worksheet layout got ruined since I have some new code in
it , so I want to copy old worksheet without code module behind.

Clara
--
thank you so much for your help

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 Code to Copy to New Worksheet [email protected] Excel Programming 2 February 7th 07 06:17 PM
Copy VB code from one worksheet to another using VBE eDude Excel Programming 2 October 19th 06 04:25 AM
Copy Worksheet with Code Bill[_30_] Excel Programming 1 September 28th 05 10:21 PM
How to copy a worksheet without its code ? PM Excel Programming 1 November 16th 04 04:20 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 10:26 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"