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

Hi all, I want macro which should create folder with name "2009" in
"C:\My Documents\Years" and if there is already folder with name
"2009" in "C:\My Documents\Years" then macro should do nothing.
Please can any friend can help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Create Folder

On Error Resume Next
MkDir "C:\My Documents\Years\2009"
On Error Goto 0

--
__________________________________
HTH

Bob

"K" wrote in message
...
Hi all, I want macro which should create folder with name "2009" in
"C:\My Documents\Years" and if there is already folder with name
"2009" in "C:\My Documents\Years" then macro should do nothing.
Please can any friend can help



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 557
Default Create Folder

On Feb 4, 4:51*pm, "Bob Phillips" wrote:
On Error Resume Next
MkDir "C:\My Documents\Years\2009"
On Error Goto 0

--
__________________________________
HTH

Bob

"K" wrote in message

...



Hi all, *I want macro which should create folder with name "2009" in
"C:\My Documents\Years" and if there is already folder with name
"2009" in "C:\My Documents\Years" then macro should do nothing.
Please can any friend can help- Hide quoted text -


- Show quoted text -


thanks lot bob
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Create Folder

I guess this could also be done without the error checking... I think this
will work

DirName = "C:\My Documents\Years\2009"
If Dir(DirName, vbDirectory) = "" Then MkDir DirName

--
Rick (MVP - Excel)


"Bob Phillips" wrote in message
...
On Error Resume Next
MkDir "C:\My Documents\Years\2009"
On Error Goto 0

--
__________________________________
HTH

Bob

"K" wrote in message
...
Hi all, I want macro which should create folder with name "2009" in
"C:\My Documents\Years" and if there is already folder with name
"2009" in "C:\My Documents\Years" then macro should do nothing.
Please can any friend can help




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 557
Default Create Folder

On Feb 4, 7:30*pm, "Rick Rothstein"
wrote:
I guess this could also be done without the error checking... I think this
will work

DirName = "C:\My Documents\Years\2009"
If Dir(DirName, vbDirectory) = "" Then MkDir DirName

--
Rick (MVP - Excel)

"Bob Phillips" wrote in message

...



On Error Resume Next
MkDir "C:\My Documents\Years\2009"
On Error Goto 0


--
__________________________________
HTH


Bob


"K" wrote in message
...
Hi all, *I want macro which should create folder with name "2009" in
"C:\My Documents\Years" and if there is already folder with name
"2009" in "C:\My Documents\Years" then macro should do nothing.
Please can any friend can help- Hide quoted text -


- Show quoted text -


Thanks Rick its brilliant


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
Save file in a new folder, but create folder only if folder doesn't already exist? nbaj2k[_40_] Excel Programming 6 August 11th 06 08:41 PM
create a folder Bob Excel Programming 10 April 19th 05 03:09 PM
Create Folder and Text File in folder Todd Huttentsine Excel Programming 2 April 29th 04 03:41 PM
Create Folder / Copy Folder / Replace Murray Outtrim[_2_] Excel Programming 0 February 24th 04 06:40 PM
Create Folder..... Paiolas Excel Programming 1 September 17th 03 06:39 PM


All times are GMT +1. The time now is 01:40 PM.

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"