Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I would like to create a folder path that a user has given. If th parent folder exists, there is no problem, but if it does not, the pat must be created. If the user specifies a folder path like C:\Folder1\Folder2\Folder3\ and either of Folder1, Folder2 and Folder3 exists they all must b created. I use the filesystemobject. I would like to do something like this: sub createPath (myPath as string) Set fs = CreateObject("Scripting.FileSystemObject") fs.createfolder (myPath) Select Case Err.Number Case 0: ' OK, directory is created, do nothing Case 58: 'OK, directory exists already Err.Clear Case 76 ' Path not found - parent folders must be created! XXXXX end select end sub Thank you! Sir -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Multiple levels of worksheet protection | Excel Worksheet Functions | |||
Multiple levels of sumif? | Excel Worksheet Functions | |||
If, Then formula - Multiple levels | Excel Worksheet Functions | |||
Multiple Subtotal levels in Excel 2003 | Excel Worksheet Functions | |||
How do I get Multiple subtotal levels in EXCEL? | Excel Discussion (Misc queries) |