$$Excel-Macros$$ Re: How to extract sheet from many excel sheets

2012-12-31 Thread Prince
Hi Maulik,

Please cut and paste this code.I hpe this may be helfull for you.

Sub CreatWorkbook()

Dim wks As Worksheet
Dim wbk As Workbook
Dim intCtr  As Integer
intCtr = 1
For Each wks In ThisWorkbook.Worksheets
If wks.Name  test Then
Set wbk = Workbooks.Add(1)
wks.UsedRange.Copy
wbk.Worksheets(1).Range(A1).PasteSpecial
Application.CutCopyMode = False
wbk.SaveAs ThisWorkbook.Path  \wbkSheet   intCtr  .xlsx, 
51
intCtr = intCtr + 1
wbk.Close
Set wbk = Nothing
End If
Next

End Sub

Note: Here the Test is the main Sheet from where the Code will be called 
so please set any of the sheet name either test or somthing else.



Regards
Prince



On Monday, December 31, 2012 1:01:52 PM UTC+5:30, maulik wrote:

 Hi team,
 I am having 1excel workbook which contains 250 excel sheets and now I want 
 to extract those sheets into separate workbook for each sheets. Means I 
 want to create 250 workbooks from.250 sheets request u to can someone 
 provide me the vb code for this.

 Need it  little urgently.


-- 
Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups MS 
EXCEL AND VBA MACROS group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.




$$Excel-Macros$$ Re: How to extract sheet from many excel sheets

2012-12-30 Thread Lalit Mohan Pandey
Hi Maulik,

May be below code help you

*Sub Test_ExtractData()*
*
*
*Dim wksSht  As Worksheet*
*Const strFileSavePath   As String = C:\*
**
*For Each wksSht In ThisWorkbook.Worksheets*
*With Workbooks.Add(1)*
*With .Worksheets(1)*
*wksSht.Cells.Copy*
*.Worksheets(1).Cells.PasteSpecial*
*.Worksheets(1).Name = wksSht.Name*
*Application.CutCopyMode = False*
*End With*
*Application.DisplayAlerts = False*
*.SaveAs strFileSavePath  wksSht.Name  .xls, 56*
*.Close False*
*Application.DisplayAlerts = True*
*End With*
*Next wksSht*
*
*
*End Sub*
*
*
Regards,
Lalit Mohan

On Monday, 31 December 2012 13:01:52 UTC+5:30, maulik wrote:

 Hi team,
 I am having 1excel workbook which contains 250 excel sheets and now I want 
 to extract those sheets into separate workbook for each sheets. Means I 
 want to create 250 workbooks from.250 sheets request u to can someone 
 provide me the vb code for this.

 Need it  little urgently.


-- 
Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups MS 
EXCEL AND VBA MACROS group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.