Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
kingdt
 
Posts: n/a
Default Copy Data from Workbook into specific Worksheet in other Workbook?


Hope someone can help

What I want to do is have a macro that copies the same cells from 10
different specifically named excel files and pastes them onto the
relevant worksheet within another workbook. All the files will be
within 1 folder.

Hope this makes sence and someone can help.

Thanks


--
kingdt
------------------------------------------------------------------------
kingdt's Profile: http://www.excelforum.com/member.php...o&userid=32531
View this thread: http://www.excelforum.com/showthread...hreadid=523143

  #2   Report Post  
Posted to microsoft.public.excel.misc
Tom Ogilvy
 
Posts: n/a
Default Copy Data from Workbook into specific Worksheet in other Workbook?

here is some pseudo code
Dim sname as String
Dim bk as Workbook
Dim rng as Range
sname = dir("C:\Myfolder\Myfile*.xls")
do while sName < ""
set bk = workbooks.open("C:\MyFolder\" & sName)
set rng = bk.worksheets(1).Range("A1:A10")
rng.copy thisworkbook.worksheets( _
left(sName,len(sname)-4)).Range("A1")
bk.close Savechanges:=False
sName = dir()
Loop

Obviously I don't know how "particular" or "relevant" should be specifically
implemented in the code.


--
Regards,
Tom Ogilvy

"kingdt" wrote:


Hope someone can help

What I want to do is have a macro that copies the same cells from 10
different specifically named excel files and pastes them onto the
relevant worksheet within another workbook. All the files will be
within 1 folder.

Hope this makes sence and someone can help.

Thanks


--
kingdt
------------------------------------------------------------------------
kingdt's Profile: http://www.excelforum.com/member.php...o&userid=32531
View this thread: http://www.excelforum.com/showthread...hreadid=523143


Reply
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
how Excel can copy the data in a row of worksheet to other? CYCLERC Excel Worksheet Functions 0 January 16th 06 06:50 AM
Macro to open workbook and copy and paste values in to orig workbo Dena X Excel Worksheet Functions 1 December 16th 05 12:13 AM
Excel Macro to Copy & Paste [email protected] Excel Worksheet Functions 0 December 1st 05 02:56 PM
automaticly copy data from one worksheet to another [email protected] Excel Discussion (Misc queries) 1 October 15th 05 03:48 AM
Open workbook to specific worksheet Dave Excel Discussion (Misc queries) 2 May 2nd 05 08:44 PM


All times are GMT +1. The time now is 02:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"