Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Why do series names on charts disappear when re-opening excel? | Charts and Charting in Excel | |||
show most recent files first when opening excel files | Excel Discussion (Misc queries) | |||
Opening Quattro Pro for Windows files (*.WB1 Files) using Excel 20 | Excel Discussion (Misc queries) | |||
How can I view files chronologically when opening multiple files | Excel Discussion (Misc queries) | |||
How do I get series of files to open from same folder | Excel Programming |