Hey,
I hope someone here can help me. I recorded the the following code with the macro recorder and it works so far. Problem is, it takes about 15 seconds until it is through. Is there a way to speed things up because I am using it for a second sheet with the same layout aswell.
It is supposed to allignt certain columns left/right and apply conditioned formatting.
Cheers
Jan
I hope someone here can help me. I recorded the the following code with the macro recorder and it works so far. Problem is, it takes about 15 seconds until it is through. Is there a way to speed things up because I am using it for a second sheet with the same layout aswell.
It is supposed to allignt certain columns left/right and apply conditioned formatting.
Cheers
Jan
Code:
Sub Button505_Click()
Sheets("Outbound").Select
Range("E:E,G:H").Select
Range("G7558").Activate
With Selection
.HorizontalAlignment = xlCenter
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ReadingOrder = xlContext
.MergeCells = False
End With
Columns("F:F").Select
Range("F7558").Activate
With Selection
.HorizontalAlignment = xlLeft
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlGreaterEqual _
, Formula1:="="""""
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlLess, _
Formula1:="=TODAY()"
Selection.FormatConditions(2).Interior.ColorIndex = 6
Cells(1, 1).Select
Range("A1").Activate
End Sub