Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening all files located in a specific directory
Hi everybody,
Having done just a few macros for Excel, I´m a total beginner in VB and I would like to ask you how to open all files located in a specific directories at once. I thought the following might work, but it doesn´t: Sub Makro1() ChDir "C:\user\Results" Workbooks.Open FileName:="*.*" End Sub Any help? *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening all files located in a specific directory
Sub Makro1()
ChDir "C:\user\Results" fName = Dir("C:\user\Results\*.xls") do while fName < "" workbooks.Open fName fName = dir() Loop End Sub Assumes you don't have any directories with a .xls extension. -- Regards, Tom Ogilvy "DaSo" wrote in message ... Hi everybody, Having done just a few macros for Excel, I´m a total beginner in VB and I would like to ask you how to open all files located in a specific directories at once. I thought the following might work, but it doesn´t: Sub Makro1() ChDir "C:\user\Results" Workbooks.Open FileName:="*.*" End Sub Any help? *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Opening all files located in a specific directory
Thanks and regards to Tom Ogilvy, problem solved.
Dan *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Where are the Excel Temporary save files located? | Excel Discussion (Misc queries) | |||
opening directory from excel | Excel Programming | |||
Check if directory empty OR no of files in directory. | Excel Programming | |||
Open files from specific directory | Excel Programming | |||
OPENING A FILE LOCATED IN A DIRECTORY DIFFERENT FROM CURRENT DIRECTORS | Excel Programming |