Prev Previous Post   Next Post Next
  #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
 
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
Copy without Hidden Cols - How abrogard Excel Discussion (Misc queries) 1 July 15th 05 07:54 AM
reminder notifications in a column L Mieth Excel Discussion (Misc queries) 6 June 10th 05 11:00 AM
Excel won't copy outside sheet Jack Sons Excel Discussion (Misc queries) 6 May 17th 05 10:05 PM
Copy Function Genie Bohn Excel Discussion (Misc queries) 0 March 23rd 05 12:28 AM
Copy and pasting graphs to PowerPoint JZip Excel Discussion (Misc queries) 0 January 6th 05 08:29 PM


All times are GMT +1. The time now is 03:55 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"