DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub askm()
Dim SonSat As Long
SonSat = Range("A" & Rows.Count).End(xlUp).Row
Application.ScreenUpdating = False
Application.DisplayAlerts = False
On Error Resume Next
For i = 2 To SonSat
Yol = ThisWorkbook.Path & "\" & Range("A" & i)
Dosya = Range("B" & i) & ".xls"
If Cells(i, 1) = "a1" Then
Set ac = Workbooks.Open(Yol & "\" & Dosya)
For x = 3 To 5
Sayfa = Cells(i, x)
ac.Sheets(Sayfa).Range("A2:D20").ClearContents
Next x
ac.Close True
ElseIf Cells(i, 1) = "b2" Then
Set ac = Workbooks.Open(Yol & "\" & Dosya)
For x = 3 To 5
Sayfa = Cells(i, x)
ac.Sheets(Sayfa).Range("A2:E47").ClearContents
Next x
ac.Close True
End If
Next
MsgBox "Dosyalardan veriler silindi...", vbInformation, "ASKM"
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub