From: Nev on
H Guys

can you help. i want to copy a sheet from a closed book into an open book
via vba macro.
Example is - run code to open the workbook, copy the only worksheet in that
book and paste it into an existing sheet in a workbook that is already open.

Can u help

Thanks

Nev
From: JLGWhiz on
You left a lot of unanswered questions so I took some liberties. You will
have to change the name "Somefile" to the actual workbook name that you want
to copy from.

Sub cpySht()
Dim wb1 As Workbook, wb2 As Workbook
Set wb1 = ActiveWorkbook
myPath = wb1.Path
fName= myPath & "Somefile.xls" <<<Sustitute actual wb name
Worbooks.Open fName
Set wb2 = ActiveWorkbook
wb2.Sheets(1).Cells.Copy wb1.Sheets(Sheets.Count).Range("A1")
Application.CutCopyMode = False
End Sub


"Nev" <Nev(a)discussions.microsoft.com> wrote in message
news:963A660E-6B42-4D37-BE2F-B6342BC3D657(a)microsoft.com...
>H Guys
>
> can you help. i want to copy a sheet from a closed book into an open book
> via vba macro.
> Example is - run code to open the workbook, copy the only worksheet in
> that
> book and paste it into an existing sheet in a workbook that is already
> open.
>
> Can u help
>
> Thanks
>
> Nev