Code: Select all
Sub STEP5testing()
Dim ws As Worksheet, b2
Dim Wb1 As Workbook, Wb2 As Workbook
Set ws = Workbooks.Open("C:\Users\**I've been banned**\Desktop\1.xls").Worksheets(1)
b2 = ws.[b2]
ws.Parent.Close False
With CreateObject("scripting.filesystemobject")
If b2 "" Then
Set Wb1 = Workbooks.Open("C:\Users\**I've been banned**\Desktop\**I've been banned**\9.15\STEP1.xlsb")
Kill "C:\UsersWolfieeeStyle\Desktop\1.xls"
Kill "C:\Users\**I've been banned**\Desktop\ap.xls"
Kill "C:\Users\**I've been banned**\Desktop\oo.xls"
Else
Set Wb1 = Workbooks.Open("C:UsersWolfieeeStyleDesktopWolfieeeStyle9.15STEP3.xlsb")
Kill "C:\Users\**I've been banned**\Desktop\1.xls"
Kill "C:\Users\**I've been banned**\Desktop\ap.xls"
Kill "C:\Users\**I've been banned**\Desktop\oo.xls"
End If
End With
End Sub
I edited the macro but it is not perfect
I am not geting any error
But the macro is incorrect
I have to kill all the files in the last(No matter condition met or Not but in the last this killing process should happen Sir)
So plz help me in the same