Re: $$Excel-Macros$$ spit varios sheets of one excel file to related other excel file

2013-07-24 Thread priti verma
You can try this code
Change Workbook name as per your Workbook name
wkbMoveto Is that workbook in which  you want to past data
wkbMoveFrom  is that workbook  from which you want to copy data

Sub Copydata()

Dim wkbMoveto As Workbook
Dim wkbmoveFrom As Workbook
Dim wksMoveto As Worksheet
Dim wksMovefrom

Set wkbmoveFrom = ThisWorkbook
Set wkbMoveto = Application.Workbooks(MYBOOK.xlsm)

For Each wksMovefrom In wkbmoveFrom.Worksheets
For Each wksMoveto In wkbMoveto.Worksheets
If wksMovefrom.Name = wksMoveto.Name Then
wksMovefrom.UsedRange.Copy
Destination:=wksMoveto.Range(a1)
End If
Next
Next

End Sub




On Tue, Jul 23, 2013 at 6:32 PM, Sagar Kasangottuwar 
sagarkasangottu...@gmail.com wrote:

 Dear Priti,

 I want to copy sheet in specific sheets   not make new sheets.

 This macro is creating new sheets.

 Thanks  Regards,

 sagar


 On Mon, Jul 22, 2013 at 6:41 PM, priti verma pritiverma1...@gmail.comwrote:

 Try this code
 Change Strpath as per your Path

 Sub creatnewWkb()
 Dim wkb As Workbook
 Dim strpath As String
 Dim wks As Worksheet
 Dim wkbnwebook As Workbook

 Set wkb = ThisWorkbook
 strpath = wkb.Path
 For Each wks In wkb.Worksheets
 wks.Copy
 wks.Paste

 ActiveWorkbook.SaveAs _
 Filename:=strpath  \  wks.Name  .xlsx

 ActiveWorkbook.Close


 Next

 End Sub



 On Mon, Jul 22, 2013 at 5:22 AM, Sagar Kasangottuwar 
 sagarkasangottu...@gmail.com wrote:

 Dear Excel experts,

 I want one macro which can spit varios sheets of one excel file to
 related other excel file.

 I have one excel file where 10 sheets are available ex. a, b, c, d and I
 have files for same sheets ex. a, b, c, d.

 So I want to transfer a, b, c, d sheets to a, b, c, d file.

 Kindly help me on the above matter.

 Thanks in advance

 SAGAR

 --
 Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be?
 It’s =TIME(2,DO:IT,N:OW) ! 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 unsubscribe from this group and stop receiving emails from it, send
 an email to excel-macros+unsubscr...@googlegroups.com.
 To post to this group, send email to excel-macros@googlegroups.com.
 Visit this group at http://groups.google.com/group/excel-macros.
 For more options, visit https://groups.google.com/groups/opt_out.




  --
 Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
 =TIME(2,DO:IT,N:OW) ! 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 unsubscribe from this group and stop receiving emails from it, send an
 email to excel-macros+unsubscr...@googlegroups.com.
 To post to this group, send email to excel-macros@googlegroups.com.
 Visit this group at http://groups.google.com/group/excel-macros.
 For more options, visit https://groups.google.com/groups/opt_out.




  --
 Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
 =TIME(2,DO:IT,N:OW) ! 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 

Re: $$Excel-Macros$$ spit varios sheets of one excel file to related other excel file

2013-07-23 Thread Sagar Kasangottuwar
Dear Priti,

I want to copy sheet in specific sheets   not make new sheets.

This macro is creating new sheets.

Thanks  Regards,

sagar


On Mon, Jul 22, 2013 at 6:41 PM, priti verma pritiverma1...@gmail.comwrote:

 Try this code
 Change Strpath as per your Path

 Sub creatnewWkb()
 Dim wkb As Workbook
 Dim strpath As String
 Dim wks As Worksheet
 Dim wkbnwebook As Workbook

 Set wkb = ThisWorkbook
 strpath = wkb.Path
 For Each wks In wkb.Worksheets
 wks.Copy
 wks.Paste

 ActiveWorkbook.SaveAs _
 Filename:=strpath  \  wks.Name  .xlsx

 ActiveWorkbook.Close


 Next

 End Sub



 On Mon, Jul 22, 2013 at 5:22 AM, Sagar Kasangottuwar 
 sagarkasangottu...@gmail.com wrote:

 Dear Excel experts,

 I want one macro which can spit varios sheets of one excel file to
 related other excel file.

 I have one excel file where 10 sheets are available ex. a, b, c, d and I
 have files for same sheets ex. a, b, c, d.

 So I want to transfer a, b, c, d sheets to a, b, c, d file.

 Kindly help me on the above matter.

 Thanks in advance

 SAGAR

 --
 Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
 =TIME(2,DO:IT,N:OW) ! 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 unsubscribe from this group and stop receiving emails from it, send an
 email to excel-macros+unsubscr...@googlegroups.com.
 To post to this group, send email to excel-macros@googlegroups.com.
 Visit this group at http://groups.google.com/group/excel-macros.
 For more options, visit https://groups.google.com/groups/opt_out.




  --
 Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
 =TIME(2,DO:IT,N:OW) ! 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 unsubscribe from this group and stop receiving emails from it, send an
 email to excel-macros+unsubscr...@googlegroups.com.
 To post to this group, send email to excel-macros@googlegroups.com.
 Visit this group at http://groups.google.com/group/excel-macros.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! 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 unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/groups/opt_out.




Re: $$Excel-Macros$$ spit varios sheets of one excel file to related other excel file

2013-07-22 Thread priti verma
Try this code
Change Strpath as per your Path

Sub creatnewWkb()
Dim wkb As Workbook
Dim strpath As String
Dim wks As Worksheet
Dim wkbnwebook As Workbook

Set wkb = ThisWorkbook
strpath = wkb.Path
For Each wks In wkb.Worksheets
wks.Copy
wks.Paste

ActiveWorkbook.SaveAs _
Filename:=strpath  \  wks.Name  .xlsx

ActiveWorkbook.Close


Next

End Sub



On Mon, Jul 22, 2013 at 5:22 AM, Sagar Kasangottuwar 
sagarkasangottu...@gmail.com wrote:

 Dear Excel experts,

 I want one macro which can spit varios sheets of one excel file to related
 other excel file.

 I have one excel file where 10 sheets are available ex. a, b, c, d and I
 have files for same sheets ex. a, b, c, d.

 So I want to transfer a, b, c, d sheets to a, b, c, d file.

 Kindly help me on the above matter.

 Thanks in advance

 SAGAR

 --
 Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s
 =TIME(2,DO:IT,N:OW) ! 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 unsubscribe from this group and stop receiving emails from it, send an
 email to excel-macros+unsubscr...@googlegroups.com.
 To post to this group, send email to excel-macros@googlegroups.com.
 Visit this group at http://groups.google.com/group/excel-macros.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! 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 unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/groups/opt_out.