Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Creating Directories

I am looking for a way to check if a directory exists on a
machine. If it dosn't I want to create it.

Can anybody help?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Creating Directories

Hi Keith,

On Error Resume Next
MkDir "C:\YourNewFolderName"
On Error GoTo 0

---
Regards,
Norman



"Keith" wrote in message
...
I am looking for a way to check if a directory exists on a
machine. If it dosn't I want to create it.

Can anybody help?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Creating Directories

Hi Keith
On Error Resume Next
ChDir "C:\Papou"
If Err < 0 Then MkDir "C:\Papou"

HTH
Cordially
Pascal

"Keith" a écrit dans le message de
...
I am looking for a way to check if a directory exists on a
machine. If it dosn't I want to create it.

Can anybody help?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Creating Directories

Well, I've coded that way :

Set a = CreateObject("Scripting.FileSystemObject")

If a.folderexists("c:\temp") Then

Else
a.createfolder ("c:\temp")
End I

--
Message posted from http://www.ExcelForum.com

Reply
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 directories freekrill Excel Discussion (Misc queries) 1 July 25th 05 09:26 AM
sub directories again Shailesh Shah[_2_] Excel Programming 5 February 9th 04 09:32 PM
sub directories again Mike[_67_] Excel Programming 2 February 7th 04 12:06 AM
sub directories Mike Excel Programming 5 February 6th 04 10:15 PM
Directories Jeff[_24_] Excel Programming 4 January 20th 04 09:26 AM


All times are GMT +1. The time now is 04:11 PM.

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

About Us

"It's about Microsoft Excel"