Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default Copy Selected Sheets' Data On New Workbook!

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
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
Copy last data entered into mulitiple sheets within a workbook? Big Al[_2_] Excel Discussion (Misc queries) 2 April 9th 09 04:50 PM
Copy data from specific sheets from one workbook to another mtuohey Excel Programming 0 August 28th 08 11:34 PM
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? Dmitry Excel Worksheet Functions 6 March 29th 06 12:43 PM
How to repeat a code for selected sheets (or a contiguous range of sheets) in a Workbook? Dmitry Excel Programming 6 March 29th 06 12:43 PM
Copy selected data to new workbook Pete[_8_] Excel Programming 3 July 19th 03 01:24 AM


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