Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create Folder.....
Hi.
I want to creat a folder in a specific path if this folder doesn´t already exists Im trying the following code but i just can get it to work (and i dont understand the "OBJECT") If Object.FolderExists(ThisWorkbook.Path & "\" & "Temp") = False Then MkDir ThisWorkbook.Path & "\" & "Temp" End If Thanks a lot Paiolas |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create Folder.....
Try this Paiolas
Sub MakeDirectory() Dim Dirname As String Dim fs As Object Set fs = CreateObject("Scripting.FileSystemObject") Dirname = "C:\Data" If Not fs.FolderExists(Dirname) Then fs.CreateFolder Dirname ' your code Else ' your code End If End Sub -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "Paiolas" wrote in message ... Hi. I want to creat a folder in a specific path if this folder doesn´t already exists Im trying the following code but i just can get it to work (and i dont understand the "OBJECT") If Object.FolderExists(ThisWorkbook.Path & "\" & "Temp") = False Then MkDir ThisWorkbook.Path & "\" & "Temp" End If Thanks a lot Paiolas |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
CREATE A FOLDER AUTOMATICALLY | New Users to Excel | |||
how to create password for an folder | New Users to Excel | |||
automatically folder create | Excel Discussion (Misc queries) | |||
Create Folder Using VBA | Excel Discussion (Misc queries) | |||
create folder and save as | Excel Discussion (Misc queries) |