Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is it possible to move a worksheet from one workbook to
another? I have a workbook that acts like a main form. During usage, it may become necessary to bring into the workbook a sheet from another workbook. So, if it is possible, how is something like that done? Or would I be better off using a different method? Thanks. *** John |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
John
This code will open a workbook called test and move a sheet in it, also called test to the first sheet in the workbook that contains the code Sub bringFromOtherBook() Dim wb As Workbook Dim sht As Worksheet Set wb = Workbooks.Open("C:\Test.xls") Set sht = wb.Worksheets("Test") sht.Move Befo=ThisWorkbook.Worksheets(1) wb.Close SaveChanges:=False Set sht = Nothing Set wb = Nothing End Sub -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England HIS "JohnE" wrote in message ... Is it possible to move a worksheet from one workbook to another? I have a workbook that acts like a main form. During usage, it may become necessary to bring into the workbook a sheet from another workbook. So, if it is possible, how is something like that done? Or would I be better off using a different method? Thanks. *** John |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Moving Data between sheets in the same workbook and moving data between Workbooks. | Excel Worksheet Functions | |||
Moving data from one workbook to another workbook | Setting up and Configuration of Excel | |||
Need help moving a worksheet to another workbook. | Excel Discussion (Misc queries) | |||
Moving Cell Information from one workbook into another workbook | Excel Worksheet Functions | |||
Moving one workbook page to a new workbook | Excel Worksheet Functions |