Please help with do while

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I use this in a userform
Do While kur1 <= kur2


Set fso = CreateObject("scripting.filesystemobject")
On Error GoTo delfolder
fso.GetFolder ("c:\" & tt & tal & kur1)

'fso.deletefile "c:\" & tt & tal & kur1 & "\*.*"
fso.deletefolder "c:\" & tt & tal & kur1 & "\*.*"
kur1 = kur1 + 1
Loop
How can i get this to work with my do while easy to say exit sub on error
but there can be other folder der are somthing in so what shall i do here ??

Reagrds Alvin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top