Set data to cell D1 of the selected worksheet. And format its contents with color and borders.
Sub cmd()
Cells(1, "D").Value = "Text"
Cells(1, "D").Select
With Selection
.Font.Bold = True
.Font.Name = "Arial"
.Font.Size = 72
.Font.Color = RGB(0, 0, 255) 'Dark blue
.Columns.AutoFit
.Interior.Color = RGB(0, 255, 255) 'Cyan
.Borders.Weight = xlThick
.Borders.Color = RGB(0, 0, 255) 'Dark Blue
End With
End Sub
Related examples in the same category