467,161 Members | 865 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,161 developers. It's quick & easy.

Tree View In Excel using VBA

Hello people!

I am trying to do something that I don't know if anyone else might have tried before...I am writing a Macro in Excel that will give a user the list of all the folders present within a selected folder. I have been successful in getting that onto a spreadsheet using the Shell command...

This is important for Project Managers who need to work with a lot of directories for their projects...especially when they want to create a new one for their project taking an old one as a base...the PM would typically add/modify/delete from the existing directory structure.

Now here is what I want:
I want the user to be able to add/modify/delete the directory structure according to his/her needs and specify a location and hit some button - that will create the new directory structure at the new location specified by the user. The problem is that the dump that I get from the Shell command is not very user friendly to add/modify/delete the directories. For example:
User wants the dump of C:\Data and gets the following on a spreadsheet (with the Shell command) -

Please Click here to see Image

where Exchange, n014996 and N212710 are the folders within C:\Data. Temp is the only folder within Exchange. Similarly, the folder n014996 contains 5 sub-folders. There are no sub-folders within N212710.

Here, the user may choose to add a new folder within C:\Data or modify any of the existing folders or even delete. I want the user to be able to do it with the help of some GUI where he can see the entire folder structure in a Tree format (the way Windows explorer shows it). Any ideas how I can achieve that using VBA and Excel?

Nov 1 '06 #1
  • viewed: 16905
1 Reply
Let me restate my question -

Is there any way to show the list that I have on this spreadsheet (see image) on a TreeView Control using Excel VBA?

Please Click here to see Image

Nov 2 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Tree menu using XML | last post: by
1 post views Thread by Jesper DK | last post: by
10 posts views Thread by dwok | last post: by
6 posts views Thread by Kishor | last post: by
3 posts views Thread by gmail | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.