Mega Code Archive

 
Categories / VisualBasic Script / Excel
 

Repeating Actions with a Loop

Sub FormatAllCellsInColumn()          Do Until ActiveCell.Value = ""              ActiveCell.Rows.EntireRow.Select              Selection.Interior.ColorIndex = 35              Selection.Interior.Pattern = xlSolid              ActiveCell.Offset(2, 0).Select          Loop      End Sub