Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I like to specify a folder, then have the excel files in the folder open one
at a time for a macro to run on it. How can I do that? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
maybe something like this:
Sub GetFileList() Dim ThePath As String Dim fname As String Dim i As Long ThePath = ThisWorkbook.Path fname = Dir(ThePath & "\*.xls") i = 1 Do While fname < "" On Error Resume Next Workbooks.Open Filename:=fname On Error GoTo 0 fname = Dir() i = i + 1 Loop End Sub -- Gary "J@Y" wrote in message ... I like to specify a folder, then have the excel files in the folder open one at a time for a macro to run on it. How can I do that? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See also this example
http://www.rondebruin.nl/copy4.htm You can change the copy/chnage code to your code -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "J@Y" wrote in message ... I like to specify a folder, then have the excel files in the folder open one at a time for a macro to run on it. How can I do that? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to open each file from the folder and save again | Excel Programming | |||
Open File in Folder | Excel Programming | |||
Open the last file in a folder | Excel Programming | |||
open file from folder save in new folder | Excel Programming | |||
How can i open a folder or file | Excel Programming |