Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
SubFolders in macro
Hi Guys, I need some code that will allow me to search a folder "Model1", an it's subfolders "Vend1, Vend2, Vend3" etc. for the file "Risk Filte VENDCODE latest.xls", open the file, copy some cells of the "Summary sheet onto a master sheet, and then close the file and move on to th next Risk filter file, which will be a different subfolder. I possible, it would then move on to the next master folder "Model2". can just run that as a different sub if needs be though... I don't need to record the VENDCODE results or anything so a wildcar there is fine, it's the subfolder searching that's getting me stuck. can do all the workbook specific code... if anyone could supply th looping subfolder searching bit, that would be excellent. Thank you, Garet -- pianoma ----------------------------------------------------------------------- pianoman's Profile: http://www.excelforum.com/member.php...fo&userid=3371 View this thread: http://www.excelforum.com/showthread.php?threadid=53713 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
SubFolders in macro
http://support.microsoft.com/kb/185476/EN-US/
How To Search Directories to Find or List Files http://support.microsoft.com/kb/185601/EN-US/ HOW TO: Recursively Search Directories by Using FileSystemObject http://support.microsoft.com/kb/186118/EN-US/ How To Use FileSystemObject with Visual Basic -- Regards, Tom Ogilvy "pianoman" wrote: Hi Guys, I need some code that will allow me to search a folder "Model1", and it's subfolders "Vend1, Vend2, Vend3" etc. for the file "Risk Filter VENDCODE latest.xls", open the file, copy some cells of the "Summary" sheet onto a master sheet, and then close the file and move on to the next Risk filter file, which will be a different subfolder. If possible, it would then move on to the next master folder "Model2". I can just run that as a different sub if needs be though... I don't need to record the VENDCODE results or anything so a wildcard there is fine, it's the subfolder searching that's getting me stuck. I can do all the workbook specific code... if anyone could supply the looping subfolder searching bit, that would be excellent. Thank you, Gareth -- pianoman ------------------------------------------------------------------------ pianoman's Profile: http://www.excelforum.com/member.php...o&userid=33712 View this thread: http://www.excelforum.com/showthread...hreadid=537137 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
SubFolders in macro
Thanks Tom... you're a wealth of useful info! Ta, Tom Ogilvy Wrote: http://support.microsoft.com/kb/185476/EN-US/ How To Search Directories to Find or List Files http://support.microsoft.com/kb/185601/EN-US/ HOW TO: Recursively Search Directories by Using FileSystemObject http://support.microsoft.com/kb/186118/EN-US/ How To Use FileSystemObject with Visual Basic -- Regards, Tom Ogilvy "pianoman" wrote: Hi Guys, I need some code that will allow me to search a folder "Model1", and it's subfolders "Vend1, Vend2, Vend3" etc. for the file "Risk Filter VENDCODE latest.xls", open the file, copy some cells of the "Summary" sheet onto a master sheet, and then close the file and move on to the next Risk filter file, which will be a different subfolder. If possible, it would then move on to the next master folder "Model2". I can just run that as a different sub if needs be though... I don't need to record the VENDCODE results or anything so a wildcard there is fine, it's the subfolder searching that's getting me stuck. I can do all the workbook specific code... if anyone could supply the looping subfolder searching bit, that would be excellent. Thank you, Gareth -- pianoman ------------------------------------------------------------------------ pianoman's Profile: http://www.excelforum.com/member.php...o&userid=33712 View this thread: http://www.excelforum.com/showthread...hreadid=537137 -- pianoman ------------------------------------------------------------------------ pianoman's Profile: http://www.excelforum.com/member.php...o&userid=33712 View this thread: http://www.excelforum.com/showthread...hreadid=537137 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Checking for subfolders and creating | Excel Worksheet Functions | |||
Auto look through subfolders | Charts and Charting in Excel | |||
please help me with folder and subfolders | Excel Programming | |||
copy subfolders, replace text in files and save files in copied subfolders | Excel Programming | |||
Get list of subfolders | Excel Programming |