View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nick Hodge Nick Hodge is offline
external usenet poster
 
Posts: 1,173
Default moving worksheet to another workbook

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