Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
MAS MAS is offline
external usenet poster
 
Posts: 19
Default MOVE Worksheet to another workbook ?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default MOVE Worksheet to another workbook ?

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   Report Post  
Posted to microsoft.public.excel.programming
MAS MAS is offline
external usenet poster
 
Posts: 19
Default MOVE Worksheet to another workbook ?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default MOVE Worksheet to another workbook ?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default MOVE Worksheet to another workbook ?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 692
Default MOVE Worksheet to another workbook ?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default MOVE Worksheet to another workbook ?

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
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
move a worksheet from one workbook to another Wizard475 Excel Discussion (Misc queries) 1 February 13th 09 07:50 PM
Why can't you just Move a worksheet in Excel '07 to new workbook? Rania Excel Worksheet Functions 1 November 15th 07 08:51 PM
Copy/Move Worksheet from one Workbook to another Anney Excel Discussion (Misc queries) 3 December 15th 06 12:42 PM
How do I move the worksheet tabs to the top of the workbook? Deborah Green Excel Discussion (Misc queries) 10 February 16th 06 03:21 PM
command button move worksheet from one workbook to another Qaspec Excel Programming 3 February 2nd 05 12:55 PM


All times are GMT +1. The time now is 03:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"