Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default subfolder Loop? But, only one....

Hi,

i am having trouble with this one. i'll try to explain the best i
can.
I have a folder named 'homogeneity testing'. there are hundereds of
subfolders
in that folder, for instance, 400501, 400502, 400503....and so on.
But, there are several subfolders in these as well. In each first
subfolder, say folder 400501, there is a *lkg_5.xls file i need to
extract from. i don't want to go
any further than this first subfolder as there are more *lkg_5.xls
files in the deeper subfolders.
Basically, i want my macro to LookIn C:\homogneity testing\ then
look in the
next subfolder, '400501' for the *lkg_5.xls file and perform the
functions i have set out. then, when done with that file, close and
move on to next subfolder, '400502', while skipping the subfolders
under '400501'.

i think, Maybe, i need a Loop to search only ONE subfolder under
'homogeneity testing' then move on to next dirct subfolder.
But........i can't seem to
figure out anything that specific. i can only write code to search
all subfolders.

Anyway, sorry this is so long and still not very informative.

Any help will be greatly appreciated.

take care
Live Long and Prosper!

SF

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 176
Default subfolder Loop? But, only one....

SF,

Use an outer loop (and set the SearchSubFolders to false, along the lines
of

Dim i As Integer

For i = 501 to 999
...
..Lookin = "homogeneity testing\400" & i
.....
.....
Next i

HTH,
Bernie
MS Excel MVP

"foamfollower" wrote in message
om...
Hi,

i am having trouble with this one. i'll try to explain the best i
can.
I have a folder named 'homogeneity testing'. there are hundereds of
subfolders
in that folder, for instance, 400501, 400502, 400503....and so on.
But, there are several subfolders in these as well. In each first
subfolder, say folder 400501, there is a *lkg_5.xls file i need to
extract from. i don't want to go
any further than this first subfolder as there are more *lkg_5.xls
files in the deeper subfolders.
Basically, i want my macro to LookIn C:\homogneity testing\ then
look in the
next subfolder, '400501' for the *lkg_5.xls file and perform the
functions i have set out. then, when done with that file, close and
move on to next subfolder, '400502', while skipping the subfolders
under '400501'.

i think, Maybe, i need a Loop to search only ONE subfolder under
'homogeneity testing' then move on to next dirct subfolder.
But........i can't seem to
figure out anything that specific. i can only write code to search
all subfolders.

Anyway, sorry this is so long and still not very informative.

Any help will be greatly appreciated.

take care
Live Long and Prosper!

SF



Reply
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
Saving a workbook by creating a folder & subfolder Gaura215 Excel Worksheet Functions 0 February 1st 11 10:47 AM
Find loop doesn't loop JSnow Excel Discussion (Misc queries) 2 June 24th 09 08:28 PM
Excel links to subfolder Mark Farrell Excel Discussion (Misc queries) 1 May 23rd 08 08:21 PM
Importing from a subfolder in your Inbox into excel Terri Excel Discussion (Misc queries) 1 February 22nd 07 06:58 PM
how to step thru only one subfolder of a folder to find like files foamfollower Excel Programming 1 November 11th 03 08:40 PM


All times are GMT +1. The time now is 02:26 PM.

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

About Us

"It's about Microsoft Excel"