LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Perform code on all (closed) workbooks scattered across sub-folders of common parent folder

I have some code that I want to be performed on all the closed workbooks in
sub-folders of a common parent, viz:

parent/childfolder1/workbook1.xls
parent/childfolder2/workbook2.xls
parent/childfolder3/workbook3.xls
parent/childfolder3/workbook4.xls
parent/childfolder4/workbook5.xls
..
..
..
parent/childfolderX/workbookY.xls

These aren't the names of the folders and workbooks, I've just used them
here for illustration. Note that some of the childfolders contain more than
one workbook on which I'd like to perform the code.

I've written the code, and it works fine, but at the moment I'm relying on
the user to run it on each workbook in turn. The code opens the workbook
chosen by the user via the Application.GetOpenFilename() method, performs
the code on that workbook, and then closes that workbook. The user then
moves onto the next workbook. Is there a way to get the code to run
automatically on each workbook in every sub-folder of the <parent folder
via one overall procedure? Basically, I want the user to just have to
specify the parent folder, and then VBA will do its stuff on all workbooks
in all childfolders beneath the parent? This sounds like it should be easy,
but something tells me it's going to be very complicated!

TIA

Ian


 
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
Formula to go into sub folders of main folder and get values from BadBoy Excel Worksheet Functions 0 January 15th 10 10:55 PM
How to decide folder-depth or How to select more folders/subfolders (folder-tree) ? Subteam Excel Discussion (Misc queries) 2 May 7th 06 08:14 PM
get the parent folder of the working folder tom taol Excel Programming 6 September 15th 05 04:31 PM
Parent Folder Bruce Excel Programming 2 September 6th 05 03:40 AM
Can I perform tasks on a closed Workbook Jeff Excel Programming 1 January 27th 05 06:13 PM


All times are GMT +1. The time now is 10:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"