LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default External Reference - Filename Change


I am trying to create VB code that takes data from one workbook and add
info to a master workbook (database).

The filenames will all have the same prefix followed by a series o
numbers.

Here is the code that I am using to grab the data from one workbook an
insert it into the database.

Range("L2").Value = Range("'[oef.xls]Sheet1'!C12").Value

This code assumes that the name of the file I am inserting will alway
be oef.xls, however I will be taking data from files called
oef-1111.xls
oef-2222.xls
oef-3333.xls, etc...

I would like the code to be able to pull from these files without m
having to rename the sheets from oef-1111.xls to oef.xls.

Thanks for your input

--
bg1846
-----------------------------------------------------------------------
bg18461's Profile: http://www.excelforum.com/member.php...nfo&userid=887
View this thread: http://www.excelforum.com/showthread.php?threadid=54991

 
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
External Links with the same filename? Serena595 Excel Worksheet Functions 6 June 25th 08 06:50 AM
Change formula to reference different external worksheets Duncuk Links and Linking in Excel 1 April 20th 08 05:34 PM
How do I use a cell value as the filename in an external link? wattkisson Excel Discussion (Misc queries) 5 July 11th 05 09:07 PM
How do I use a cell value as the filename in an external link? wattkisson Excel Programming 2 July 11th 05 09:06 PM
How do I use a cell value as the filename in an external link? wattkisson Excel Worksheet Functions 1 July 8th 05 11:51 PM


All times are GMT +1. The time now is 06:26 AM.

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"