The macro recorder will often create a macro that uses the Select method and the Selection property but in Visual Basic, it is usually not necessary to select cells before modifying them.
The Select method activates sheets and objects on sheets.
Select works only on the active worksheet.
The Selection property returns an object that represents the current selection on the active sheet in the active workbook.
Before you can use the Selection property successfully, you must:
Sub Macro1()
Sheets("Sheet1").Select
Range("A1").Select
ActiveCell.FormulaR1C1 = "Name"
Range("B1").Select
ActiveCell.FormulaR1C1 = "Address"
Range("A1:B1").Select
Selection.Font.Bold = True
End Sub
Sub Labels()
With Worksheets("Sheet1")
.Range("A1") = "Name"
.Range("B1") = "Address"
.Range("A1:B1").Font.Bold = True
End With
End Sub
where: