Thread: Copy
View Single Post
  #1   Report Post  
Michael
 
Posts: n/a
Default Copy

Hi...

I have a small problem but still need some help.

I have a workbook called "Sumary.xls" located in a folder

Dim strPath As String
Dim strParent As String
Dim pos As Long
Dim Slutt As String

strPath = ActiveWorkbook.Path

**** Then i have to open another workbook called "Statistikk.xls"

pos = InStrRev(strPath, "\")

strParent = Left(strPath, pos - 1)

Slutt = strParent & "\VT" & "\VT" & "\Arkiv\" & "Statistikk.xls"

Workbooks.Open Slutt

***Everything is ok with this, but:

***** Then i want to copy the sheet "stat" in the "Statistikk.xls" workbook

Workbooks("Statistikk.xls").Worksheets("stat").Cop y

****And paste it to a sheet called "VT" in the "sumary" workbook.

ThisWorkbook.Worksheets("VT").Paste =
Workbooks("Statistikk.xls").Worksheets("stat")


But this doesnt work, please help!

Mike
--
Nil Satis Nisi Optimum