Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have a workbook called matrixbook.xls that contains a seperate worksheet for each day up to about 6 weeks ahead. After each day has been and gone I need to open a workbook called archivebook.xls and move the sheets for the day or sometimes days that have passed into the archivebook.xls So its like this. open archivebook.xls move active sheets (the ones in matrixbook.xls) to archivebook.xls save and close archivebook.xls How do I do it please ? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Have both workbook open, select the sheet you wish to move and then use
EDIT-MOVE or COPY in the TO BOOK area select archivebook.xls in the BEFORE SHEET area choose where you wish to move it to and press OK. If you check the 'create a copy' box then the sheet is only copied not moved! If you wish to move more than one sheet, hold the ctrl key and click each worksheet tab before you use the edit move option. -- Cheers Nigel "MAS" wrote in message ... Hi, I have a workbook called matrixbook.xls that contains a seperate worksheet for each day up to about 6 weeks ahead. After each day has been and gone I need to open a workbook called archivebook.xls and move the sheets for the day or sometimes days that have passed into the archivebook.xls So its like this. open archivebook.xls move active sheets (the ones in matrixbook.xls) to archivebook.xls save and close archivebook.xls How do I do it please ? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I had assumed the fact that I posted this in the 'PROGRAMMING' group it
would be obvious I was looking for the VBA solution ? "Nigel" wrote in message ... Have both workbook open, select the sheet you wish to move and then use EDIT-MOVE or COPY in the TO BOOK area select archivebook.xls in the BEFORE SHEET area choose where you wish to move it to and press OK. If you check the 'create a copy' box then the sheet is only copied not moved! If you wish to move more than one sheet, hold the ctrl key and click each worksheet tab before you use the edit move option. -- Cheers Nigel "MAS" wrote in message ... Hi, I have a workbook called matrixbook.xls that contains a seperate worksheet for each day up to about 6 weeks ahead. After each day has been and gone I need to open a workbook called archivebook.xls and move the sheets for the day or sometimes days that have passed into the archivebook.xls So its like this. open archivebook.xls move active sheets (the ones in matrixbook.xls) to archivebook.xls save and close archivebook.xls How do I do it please ? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No need to get antsy, the guy tried to help. We get many non-VBA questions
in this forum. Anyway, assuming your sheets are dated, format such as 01-Jun-2005, then try Dim oWb As Workbook Dim sh As Worksheet Set oWb = Workbooks.Open(Filename:="Archivebook.xls") For Each sh In Workbooks("matrixbook.xls").Worksheets If DateValue(sh.Name) < Date Then sh.Move Befo=oWb.Worksheets(oWb.Worksheets.Count) End If Next sh Workbooks("matrixbook.xls").Save oWb.Save oWb.Close -- HTH RP (remove nothere from the email address if mailing direct) "MAS" wrote in message ... I had assumed the fact that I posted this in the 'PROGRAMMING' group it would be obvious I was looking for the VBA solution ? "Nigel" wrote in message ... Have both workbook open, select the sheet you wish to move and then use EDIT-MOVE or COPY in the TO BOOK area select archivebook.xls in the BEFORE SHEET area choose where you wish to move it to and press OK. If you check the 'create a copy' box then the sheet is only copied not moved! If you wish to move more than one sheet, hold the ctrl key and click each worksheet tab before you use the edit move option. -- Cheers Nigel "MAS" wrote in message ... Hi, I have a workbook called matrixbook.xls that contains a seperate worksheet for each day up to about 6 weeks ahead. After each day has been and gone I need to open a workbook called archivebook.xls and move the sheets for the day or sometimes days that have passed into the archivebook.xls So its like this. open archivebook.xls move active sheets (the ones in matrixbook.xls) to archivebook.xls save and close archivebook.xls How do I do it please ? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
So you want a VBA a solution? Then why not ask for one and provide
sufficient information to aid anybody willing to help. "MAS" wrote in message ... I had assumed the fact that I posted this in the 'PROGRAMMING' group it would be obvious I was looking for the VBA solution ? "Nigel" wrote in message ... Have both workbook open, select the sheet you wish to move and then use EDIT-MOVE or COPY in the TO BOOK area select archivebook.xls in the BEFORE SHEET area choose where you wish to move it to and press OK. If you check the 'create a copy' box then the sheet is only copied not moved! If you wish to move more than one sheet, hold the ctrl key and click each worksheet tab before you use the edit move option. -- Cheers Nigel "MAS" wrote in message ... Hi, I have a workbook called matrixbook.xls that contains a seperate worksheet for each day up to about 6 weeks ahead. After each day has been and gone I need to open a workbook called archivebook.xls and move the sheets for the day or sometimes days that have passed into the archivebook.xls So its like this. open archivebook.xls move active sheets (the ones in matrixbook.xls) to archivebook.xls save and close archivebook.xls How do I do it please ? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nigel,
Have patience - myself and many others have difficulty phrasing our questions. Since this is a programming group - I try to keep my responses to code. But will offer any relatively simple spreadsheet solution also. Or vice-versa. My experience has shown me that the user is trying to get from A to B and needs a map. Sometimes the user wants the scenic route, sometimes the shortest route, and sometimes the longest route. But he/she doesn't always know how to ask. So I just dig into my bag of tricks and show how I might do it... -- steveB Remove "AYN" from email to respond "Nigel" wrote in message ... So you want a VBA a solution? Then why not ask for one and provide sufficient information to aid anybody willing to help. "MAS" wrote in message ... I had assumed the fact that I posted this in the 'PROGRAMMING' group it would be obvious I was looking for the VBA solution ? "Nigel" wrote in message ... Have both workbook open, select the sheet you wish to move and then use EDIT-MOVE or COPY in the TO BOOK area select archivebook.xls in the BEFORE SHEET area choose where you wish to move it to and press OK. If you check the 'create a copy' box then the sheet is only copied not moved! If you wish to move more than one sheet, hold the ctrl key and click each worksheet tab before you use the edit move option. -- Cheers Nigel "MAS" wrote in message ... Hi, I have a workbook called matrixbook.xls that contains a seperate worksheet for each day up to about 6 weeks ahead. After each day has been and gone I need to open a workbook called archivebook.xls and move the sheets for the day or sometimes days that have passed into the archivebook.xls So its like this. open archivebook.xls move active sheets (the ones in matrixbook.xls) to archivebook.xls save and close archivebook.xls How do I do it please ? |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nigel,
An appropriate response might have been...<g '--------------------- Sub MoveSheets() Dim sht As Object Do For Each sht In Sheets sht.Move after:=Sheets(Sheets.Count) Next Loop End Sub '---------------- Jim Cone San Francisco, USA "Nigel" wrote in message ... So you want a VBA a solution? Then why not ask for one and provide sufficient information to aid anybody willing to help. "MAS" wrote in message ... I had assumed the fact that I posted this in the 'PROGRAMMING' group it would be obvious I was looking for the VBA solution ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
move a worksheet from one workbook to another | Excel Discussion (Misc queries) | |||
Why can't you just Move a worksheet in Excel '07 to new workbook? | Excel Worksheet Functions | |||
Copy/Move Worksheet from one Workbook to another | Excel Discussion (Misc queries) | |||
How do I move the worksheet tabs to the top of the workbook? | Excel Discussion (Misc queries) | |||
command button move worksheet from one workbook to another | Excel Programming |