Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating directories from excel
Hi Kevin
The Dir function test the existence of the folder (works for file as well) MkDir create the specified directory Sub test() If Dir("C:\TempTest\") = "" Then MkDir ("C:\TempTest\") End If End Sub Regards, Jean-Yves "Keivn Green" wrote in message ... I would like to create a directory using a macro which is easy enough, but how can I have it verify whether or not its there? would it be "if dir: blablabla = true then"? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating directories from excel
You can also just skip the test and create it. If it exists, an error will be raised which can be ignored Sub test() On Error Resume Next MkDir ("C:\TempTest\") On Error goto 0 End Sub -- Regards, Tom Ogilvy "Keivn Green" wrote in message ... ThankYou!!! "Jean-Yves" wrote: Hi Kevin The Dir function test the existence of the folder (works for file as well) MkDir create the specified directory Sub test() If Dir("C:\TempTest\") = "" Then MkDir ("C:\TempTest\") End If End Sub Regards, Jean-Yves "Keivn Green" wrote in message ... I would like to create a directory using a macro which is easy enough, but how can I have it verify whether or not its there? would it be "if dir: blablabla = true then"? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I get excel files to open automatically from directories? | Excel Discussion (Misc queries) | |||
creating directories | Excel Discussion (Misc queries) | |||
Excel VBA - Creating Directories | Excel Programming | |||
Creating a list of directories | Excel Programming | |||
Creating Directories | Excel Programming |