Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Load all files in a directory
I would like to load all my .xls file, How would I do this please.
Thanks again Greg |
#2
|
|||
|
|||
I have the below in a standard module of a surrogate file xyz.xls:
I open xyz; Run the Macro, then Close xyz; Sub OpenMyFiles() Dim sPath As String, sName As String Dim bk As Workbook sPath = "C:\My Documents\MyFavoriteFiles\" sName = Dir(sPath & "*.xls") Do While sName < "" Set bk = Workbooks.Open(sPath & sName) ' . . . process bk ' bk.Close Savechanges:=False ' or true sName = Dir Loop End Sub "Greg B..." wrote in message ... I would like to load all my .xls file, How would I do this please. Thanks again Greg |
#3
|
|||
|
|||
Thanks Jim, just what I wanted
Greg |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cannot access read-only documents. | Excel Discussion (Misc queries) | |||
change directory for refresh data | Excel Discussion (Misc queries) | |||
my files won't load completely in excel | Excel Discussion (Misc queries) | |||
importing multiple text files URGENT!!! HELP | Excel Worksheet Functions | |||
importing multiple text files??? | Excel Discussion (Misc queries) |