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