here is the code...
Sub filecopy()sheetname = ActiveWorkbook.ActiveSheet.Range("a16")Path =
ActiveWorkbook.ActiveSheet.Range("a15")
Sheets("Sheet1").Select Sheets("Sheet1").Copy ActiveWorkbook.SaveAs
Path & "\" & "book2", FileFormat:=56 ActiveSheet.Name = sheetname
ActiveWorkbook.Sheets(sheetname).Range("a15:a16") = "" ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub
--- On Tue, 4/30/13, santosh subudhi <[email protected]> wrote:
From: santosh subudhi <[email protected]>
Subject: $$Excel-Macros$$ copy the active worksheet and paste it to another
workbook in a given path.
To: "excel-macros" <[email protected]>
Date: Tuesday, April 30, 2013, 11:48 PM
Hello Team,
I need a code that will copy the active worksheet and paste it to another
workbook in a given path.
The path will be in one of the cells of the active worksheet.
For example my active workbook name is book1 and I want the sheet 1 of book 1
to be copied and save it in another workbook named book2 as the last worksheet.
The path of book 2 is in cell A15 of Sheet 1 of book 1.
Once the sheet is moved to book 2 the sheet name should also be changed.The
name of the sheet is saved in Cell A16 of sheet1 of book1.
--
Regards
Santosh
[email protected]
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/excel-macros?hl=en.
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/excel-macros?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.