LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Creating Subfolders

Hi All,

I've "inherited" the following code that creates a folder structure under a
Job Number for our company:

Private Sub CreateTree(sJobNo As String, sClient As String, sProject As
String)

Dim sPath As String
Dim sClientPath As String

sPath = Left$(ActiveWorkbook.Path, Len(ActiveWorkbook.Path) - 16)
sClientPath = sPath & "Client_List"
sPath = sPath & "Year_" & Mid$(sJobNo, InStr(1, sJobNo, "-") - 4, 4) &
"_Jobs"

On Error Resume Next
MkDir sPath
On Error GoTo 0
sPath = sPath & "\" & sJobNo & "_Client_" & sClient
On Error Resume Next
MkDir sPath
On Error GoTo 0
SetAttr sPath, vbSystem
MakeDesktopIni sPath & "\desktop.ini", sProject

CreateSubFolders sPath, "Account_Management", "Accounting", "Design", _
"Pictures", "Project_Management"
CreateSubFolders sPath & "\Account_Management", "Contract", "Quotes",
"Forms", _
"Documents", "Timelines", "Sales", "SRFs"
CreateSubFolders sPath & "\Accounting", "Final_Job_Cost", "To_Bills"
CreateSubFolders sPath & "\Design", "Conceptual", "Development",
"Engineering", _
"Final", "Presentation"
CreateSubFolders sPath & "\Project_Management", "BOM's", "Costing",
"PO's", _
"Production_Documents", "Presentation"

CreateLink sJobNo, sClient

End Sub


It creates the following structu

' Jobs
' +- XL (you are here)
' +-Client List
' | +-<Client
' | +-<Job # - <Job Name (shortcut)
' +- Year <year Jobs
' <Job # - Client <Client Name
' +- desktop.ini
' +- Account_Management
' | +- Contract
' | +- Forms
' | +- Documents
' | +- Timelines
' | +- Sales
' | +- SRFs
' +- Accounting
' | +- Final_Job_Costs
' | +- To_Bills
' +- Design
' | +- Conceptual
' | +- Development
' | +- Engineering
' | +- Final
' | +- Presentation
' +- Pictures
' +- Project_Management
' | +- BOM's
' | +- Costing
' | +- PO's
' | +- Production_Documents


Here is my dilemma, I can't seem to create a subfolder off of the second
level directory structure. I've tried ......\Design\Enigeering\DXFs (using
the above 'createsubfolders' code) but that doesn't work.

Any Clues??


TIA


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a list of Subfolders and sizes Laurence Lombard Excel Programming 9 August 27th 06 01:26 AM
Checking for subfolders and creating Gizmo63 Excel Worksheet Functions 1 August 16th 06 12:46 AM
Creating folders and subfolders from excel file list afaubert Excel Discussion (Misc queries) 4 November 8th 05 11:44 PM
please help me with folder and subfolders pieros Excel Programming 2 November 4th 05 12:52 PM
copy subfolders, replace text in files and save files in copied subfolders pieros Excel Programming 0 November 1st 05 12:08 PM


All times are GMT +1. The time now is 06:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"