Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Save file in a new folder, but create folder only if folder doesn't already exist? | Excel Programming | |||
create a folder | Excel Programming | |||
Create Folder and Text File in folder | Excel Programming | |||
Create Folder / Copy Folder / Replace | Excel Programming | |||
Create Folder..... | Excel Programming |