Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
If i use fso.Createfolder "c:\" & tt & tal & kur1 How can i make a msgbox and exit if the folder allready exits Regards alvin |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
fso.GetFolder("c:\" & tt & tal & kur1) returns an error if the foler does not
exist, so, On Error goto NoFolder Set FolderObj = fso.GetFolder("c:\" & tt & tal & kur1) MsgBox "Folder already exists!" Exit Sub NoFolder: fso.Createfolder "c:\" & tt & tal & kur1 .... "Alvin Hansen" wrote: Hi If i use fso.Createfolder "c:\" & tt & tal & kur1 How can i make a msgbox and exit if the folder allready exits Regards alvin |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks
its working Alvin "K Dales" skrev: fso.GetFolder("c:\" & tt & tal & kur1) returns an error if the foler does not exist, so, On Error goto NoFolder Set FolderObj = fso.GetFolder("c:\" & tt & tal & kur1) MsgBox "Folder already exists!" Exit Sub NoFolder: fso.Createfolder "c:\" & tt & tal & kur1 ... "Alvin Hansen" wrote: Hi If i use fso.Createfolder "c:\" & tt & tal & kur1 How can i make a msgbox and exit if the folder allready exits Regards alvin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
filesystemobject | Excel Programming | |||
Help using FileSystemObject CopyFile | Excel Programming | |||
FileSystemObject | Excel Programming | |||
FileSystemObject Error | Excel Programming | |||
Help with FileSystemObject? | Excel Programming |