PDA

View Full Version : Linking excel with folders and show the content



mdensana
10-27-2009, 05:35 PM
Hi All, I am quite new to Excel and VBA and reading the similar posts didn't help me too much. The problem is that I have an excel template that has the following structure:

(Column B)
MUSIC
Alternative
file name 1
file name 2
2009
file name 1
file name 2
2008
...
Rock
2009
2008
2007
etc.


In my directory the structure is different:

2009
Music
Alternative
Rock
Classic
etc.

2008
Music
Alternative
Rock
Classic etc.

What I need is VBA code that will help me keep the spreadsheet updated with names of new files as they are being uploaded in my directory folders. Simply put I need to cross link Music genres in the spreadsheet with appropriate folders (different years) and keep the lists of files updated with both a single mouse click and individually by clicking the separate genre links.

Ideally I will have only names without extensions (.mp3, .mov etc.).
Code should be able to recognise the difference between files already in the spreadsheet and new files in folders and append names of new files in different color (ie. red). My folder names and names of the files are both in column B and code should not affect information in other columns.

Any solution or advice is greatly appreciated!!

Cheers!!

Paul

parttime_guy
10-30-2009, 07:57 PM
Hi mdensana,

Try going through this post

http://www.vbaexpress.com/forum/showthread.php?t=28658

Hope it helps

Best regards

rbrhodes
10-31-2009, 01:30 AM
Hi Paul.

This looks like a project to me. Send me an example file with the directory explanation and I'll have a look at it for you.

mdensana
11-08-2009, 10:11 AM
Hi Rbrhodes,

Please find it attached, the folder structure and template. It is different than the example I initially posted here. This one is the real directory I need help for from you guru guys. I appreciate your time and thanks so much!!

rbrhodes
11-08-2009, 12:56 PM
Hi m,

The zip file contains some folders and thats it. Don't quite see the project...

mdensana
11-08-2009, 03:38 PM
Sorry about that, I thought that directory structure was enough for coding. I added some dummy files and I also updated the spreadsheet so it hopefully makes more sense now. Thanks Rbrhodes.