RmDir and Kill don't seem to work.. No.. FSO and API please
Last edited by moinkhan; Sep 20th, 2002 at 09:51 AM.
try this out VB Code: Private Sub Command1_Click() On Error GoTo eh: Kill "c:\testing\*.*" RmDir "c:\testing\" Exit Sub eh: If Err.Number = 53 Then 'dir was empty Resume Next ElseIf Err.Number = 76 Then 'dir does not exist MsgBox "DIR HAS ALREADY BEEN DELETED" Else MsgBox Err.Description & Err.Number End If End Sub
Private Sub Command1_Click() On Error GoTo eh: Kill "c:\testing\*.*" RmDir "c:\testing\" Exit Sub eh: If Err.Number = 53 Then 'dir was empty Resume Next ElseIf Err.Number = 76 Then 'dir does not exist MsgBox "DIR HAS ALREADY BEEN DELETED" Else MsgBox Err.Description & Err.Number End If End Sub
Ah!!! Great!! Thankyou very much!!! so nice of you
always happy to help.. and actually write code that works
Forum Rules