ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   creating directories (https://www.excelbanter.com/excel-discussion-misc-queries/36861-creating-directories.html)

freekrill

creating directories
 

Hi,
Is it possible to include in a macro code to create and name a new
directory?

Cheers
Free


--
freekrill
------------------------------------------------------------------------
freekrill's Profile: http://www.excelforum.com/member.php...fo&userid=7561
View this thread: http://www.excelforum.com/showthread...hreadid=389802


Bob Phillips

MkDir "C:\myTest\mySubTest"

You need to be careful that the upper directories exist fisrt, so probably
best to just try and create them

On Error Resume Next
MkDir "C:\myTest"
MkDir "C:\myTest\mySubTest"
MkDir "C:\myTest\mySubTest\mySubSubTest"
On Error GoTo 0



--

HTH

RP
(remove nothere from the email address if mailing direct)


"freekrill" wrote
in message ...

Hi,
Is it possible to include in a macro code to create and name a new
directory?

Cheers
Free


--
freekrill
------------------------------------------------------------------------
freekrill's Profile:

http://www.excelforum.com/member.php...fo&userid=7561
View this thread: http://www.excelforum.com/showthread...hreadid=389802





All times are GMT +1. The time now is 07:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com