PC Review


Reply
Thread Tools Rate Thread

Copy Selected Sheets' Data On New Workbook!

 
 
Faraz A. Qureshi
Guest
Posts: n/a
 
      15th Dec 2009
Uptil now I had developed and been using the following code so as to create a
copy of the selected sheets to a new workbook without formulas. However,
today when I had some formulas with the INDIRECT function referring to other
sheets and names the result was an error.

Any guidance/suggestion/sample/advice in respect of making a code to copy
the entire RANGE (as by Ctrl+C mode) of the selected/grouped sheets
one-by-one and pasting the same specially (i.e. only values & formats) to a
new workbook's sheets, shall be highly obliged.

Thanx in advance.

Sub PstSpcl2(CONTROL As IRibbonControl)
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
ActiveWorkbook.Windows(1).SelectedSheets.Copy
ActiveWorkbook.Sheets.Select
For Each Sh In ActiveWorkbook.Sheets
SLC = Selection.Address
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Range(SLC).Select
Next
ActiveSheet.Select
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
End Sub

--
Best Regards,

Faraz
 
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 last data entered into mulitiple sheets within a workbook? Big Al Microsoft Excel Misc 2 9th Apr 2009 04:50 PM
Copy data from specific sheets from one workbook to another mtuohey Microsoft Excel Programming 0 28th Aug 2008 11:34 PM
How to Change Source Data after copy sheets from another workbook? =?Utf-8?B?ZGF2eQ==?= Microsoft Excel Programming 3 27th Jan 2007 06:58 PM
copy data in one sheet to multiple sheets in same workbook =?Utf-8?B?QnJpYW5NdWx0aUxhbmd1YWdl?= Microsoft Excel Worksheet Functions 4 27th Jul 2005 07:26 PM
Copy selected data to new workbook Pete Microsoft Excel Programming 3 19th Jul 2003 01:24 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:49 PM.