Hi, I have a code that excel runs very slowly (about 3 or 4 minutes) and i don't know what the problem is. I tried with option to put calculation on manually but it's not helpful at all, I also tried put it into a code, it didn't worked. Please help!
My code:
My code:
Code:
Private Sub Workbook_AfterSave(ByVal Success As Boolean)
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim WS As Worksheet
Set WS = Sheets("Sheet1")
With WS
.Unprotect Password:="0000"
.UsedRange.Locked = True
.UsedRange.SpecialCells(xlCellTypeBlanks).Locked = False
.Protect Password:="0000"
End With
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
Exit Sub
End Sub