Computing.Net > Forums > Office Software > automated folder creation in excel

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

automated folder creation in excel

Reply to Message Icon

Name: JoaTMoN
Date: December 1, 2006 at 03:54:48 Pacific
OS: xp
CPU/Ram: p4 512mb
Product: hp
Comment:

Hey all,

New to this forum and also relatively new to VBA. I apologise if this is a bit long, but I want to make my problem as clear as I can.

I’ve created a file tracking system for work with information on customers, projects and who’s working on them etc.

What I wish to achieve is to create a macro that will create folders in our shared drive based on the input in a specific row. This will help reduce the time taken on admin.

So for a new file entry (e.g. filename; customer; project;…) I would want to create folders for C:\customer\project\filename\

It would need an input box so that the user can input the row or file name that they wish to create the folder for.

I will then map this macro to an object on the screen so that the user only has to push a button and select a row to create the desired folders.

Any help will be greatly appreciated and if you have any questions don’t hesitate to ask.

Ben




Sponsored Link
Ads by Google

Response Number 1
Name: Grok Lobster
Date: December 1, 2006 at 07:37:56 Pacific
Reply:

You need to use the FileSystemObject. Here is some sample code to get you thinking,

Sub ChangeReadOnly()
Dim fs, f, f1, fc, s, sf, CurrentDirectory, df, d1
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFolder("H:\")
Set sf = f.subfolders
For Each f1 In sf
If f1.ReadOnly = True Then
Set f1.ReadOnly = False
End If
Next
End Sub


0
Reply to Message Icon

Related Posts

See More


Items in calendar Programming Outlook Forms



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: automated folder creation in excel

Folder order in file/open dialogue www.computing.net/answers/office/folder-order-in-fileopen-dialogue/4227.html

extract folder name to excel www.computing.net/answers/office/extract-folder-name-to-excel/7865.html

Creating A Main Board in Excel www.computing.net/answers/office/creating-a-main-board-in-excel/8204.html