Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default How do I get series of files to open from same folder

I raised a query similar to this before and was given some
code along the follwoing lines:

Workbooks.Open FileName:=ThisWorkbook.Path
& "\userfile.xls"

The difference this time I am wanting to open a series of
files from the given folder. Any help would be
appreciated.

TIA
Ron


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default How do I get series of files to open from same folder

Ron,

You'd have to open them sequentially, using the same coding
that you were given:

Workbooks.Open FileName:=ThisWorkbook.Path & "\file1.xls"
Workbooks.Open FileName:=ThisWorkbook.Path & "\file2.xls"
Workbooks.Open FileName:=ThisWorkbook.Path & "\file3.xls"

Another option would be to save the open workbooks as a "Workspace"
Then whenever you open the workspace, all the files in the workspace
will be opened together.

John


Ron McCormick wrote:

I raised a query similar to this before and was given some
code along the follwoing lines:

Workbooks.Open FileName:=ThisWorkbook.Path
& "\userfile.xls"

The difference this time I am wanting to open a series of
files from the given folder. Any help would be
appreciated.

TIA
Ron


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How do I get series of files to open from same folder

How would we determine the series. Do you want to open all the files in
the folder, or those meeting certain criteria in terms of their name.

In any event, look at the sample for the Dir command in VBA. That is a good
start.

--
Regards,
Tom Ogilvy


"Ron McCormick" wrote in message
...
I raised a query similar to this before and was given some
code along the follwoing lines:

Workbooks.Open FileName:=ThisWorkbook.Path
& "\userfile.xls"

The difference this time I am wanting to open a series of
files from the given folder. Any help would be
appreciated.

TIA
Ron




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 do you set Excel 2007 to open files in a specific folder? Opening to a specific folder Excel Discussion (Misc queries) 2 August 12th 07 02:58 AM
can't open excel files from common folder dsdproduction Excel Discussion (Misc queries) 4 July 5th 07 08:34 PM
Can't Open Certain Excel Files in Folder Charles A C Excel Discussion (Misc queries) 2 March 23rd 07 12:02 AM
create a list of worksheet names (from a single folder, or open files) Drew Excel Discussion (Misc queries) 2 April 15th 05 04:58 PM
open all files in a folder and ... walt Excel Programming 5 August 7th 03 02:23 AM


All times are GMT +1. The time now is 04:28 PM.

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"