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
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
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
>
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
> >
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks