Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Opening a series of files

I have a macro that runs through a series of automatically generated data and
then calculates utilization. Every day has a different file. I would like
to set it up to open every file for the month and make the calculations. Can
you help with this? Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Opening a series of files

Depends how you know which files to open.
If it only some files in a folder you can use:
Dim RetVal As Variant
Application.GetOpenFilename(MultiSelect:=True)
so the user can select all of those of interest

Or if it is all the file in a particular folder
Dim Filename As String
FileName=Dir(RequiredFolder & "\*.xls)
Do While Filename<""
'Do you stuff
FileName=Dir()
Loop

Either way, if you need to process the files in a specific order, you will
need to sort the file names in that order then open them in turn.
If not, then open-process-close as you find them.

NickHK

"joshroberts" wrote in message
...
I have a macro that runs through a series of automatically generated data

and
then calculates utilization. Every day has a different file. I would

like
to set it up to open every file for the month and make the calculations.

Can
you help with this? Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Opening a series of files

Can you explain to me how to open each file and make that sheet the
activesheet so I can read through the data with my program? Thanks.

"NickHK" wrote:

Depends how you know which files to open.
If it only some files in a folder you can use:
Dim RetVal As Variant
Application.GetOpenFilename(MultiSelect:=True)
so the user can select all of those of interest

Or if it is all the file in a particular folder
Dim Filename As String
FileName=Dir(RequiredFolder & "\*.xls)
Do While Filename<""
'Do you stuff
FileName=Dir()
Loop

Either way, if you need to process the files in a specific order, you will
need to sort the file names in that order then open them in turn.
If not, then open-process-close as you find them.

NickHK

"joshroberts" wrote in message
...
I have a macro that runs through a series of automatically generated data

and
then calculates utilization. Every day has a different file. I would

like
to set it up to open every file for the month and make the calculations.

Can
you help with this? Thanks.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Opening a series of files

Never mind I figured it out. Thanks.

"NickHK" wrote:

Depends how you know which files to open.
If it only some files in a folder you can use:
Dim RetVal As Variant
Application.GetOpenFilename(MultiSelect:=True)
so the user can select all of those of interest

Or if it is all the file in a particular folder
Dim Filename As String
FileName=Dir(RequiredFolder & "\*.xls)
Do While Filename<""
'Do you stuff
FileName=Dir()
Loop

Either way, if you need to process the files in a specific order, you will
need to sort the file names in that order then open them in turn.
If not, then open-process-close as you find them.

NickHK

"joshroberts" wrote in message
...
I have a macro that runs through a series of automatically generated data

and
then calculates utilization. Every day has a different file. I would

like
to set it up to open every file for the month and make the calculations.

Can
you help with this? Thanks.




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
Why do series names on charts disappear when re-opening excel? DLL Charts and Charting in Excel 0 October 8th 08 03:40 PM
show most recent files first when opening excel files Anne` Excel Discussion (Misc queries) 5 January 23rd 08 01:54 AM
Opening Quattro Pro for Windows files (*.WB1 Files) using Excel 20 PoundMutt Excel Discussion (Misc queries) 1 June 20th 07 03:50 AM
How can I view files chronologically when opening multiple files Stevilsize Excel Discussion (Misc queries) 3 July 26th 05 12:49 AM
How do I get series of files to open from same folder Ron McCormick[_2_] Excel Programming 2 August 18th 03 05:05 PM


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