![]() |
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 |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 05:23 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com