Hi guys, I'm after some help.
I basically need to create a list of directories and subdirectories within a specific folder, for instance:
C:\Folder\
C:\Folder\Subfolder1\
C:\Folder\Subfolder2\
C:\Folder\Subfolder1\File1\
C:\Folder\Subfolder1\File2\
C:\Folder\Subfolder2\File1\
C:\Folder\Subfolder2\File2\
While I'm fairly competent with VBA within the confines of a spreadsheet, I don't know anything about folder structure-type programming, but I found something that kind of works (posted by Pike) here:http://www.excelforum.com/excel-prog...m-folders.html
However this lists all files, whereas I don't need to go that deep.
A further problem, which I found while running the above, is that I don't have access to a number of these directories. On an occasion where access is denied, this code stops. But I'd prefer if it just listed something like:
C:\Folder\Subfolder2\File2\FORBIDDEN
And moved onto the next folder.
Can anyone give me something that could work, or at least point me in the direction of a good walkthrough guide for this kind of programming?
Bookmarks