I am trying to sort some cells and then center and bold the afterwords added header of my list and the process is very slow. This is the end of a working macro and I see that it has gotten much slower after I added the bellow code:
Columns("A:F").Select
ActiveWorkbook.Worksheets("search results").sort.SortFields.Clear
ActiveWorkbook.Worksheets("search results").sort.SortFields.Add Key:=Range( _
"E2:E112"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("search results").sort
.SetRange Range("A1:F112")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Worksheets("search results").Activate
Range("A1").EntireRow.Insert
Range("A1") = "A/A"
Range("B1") = "Tag"
Range("C1") = "Work"
Range("D1") = "Ôýðïò"
Range("E1") = "Date"
Range("F1") = "Remark"
Worksheets("search results").Range("A1:F1").Font.Bold = True
Worksheets("search results").Range("A1:F1").HorizontalAlignment =xlCenter
Worksheets("search results").Activate
Range("A1").Activate
Is there something wrong or a way to do this more effective ? Somethimes the programm is not even responding and I have to close and restart.