Hi guys,

I'm brand new to VBA so this is probably extremely basic. I understand ActiveCell is used to describe a single cell, but I was wondering how to describe my entire selection. An excel VBA course told me "Selection" should work, but I get an error message saying "Ambiguous name detected ~". The code I attempted to run is below. If I input a range instead of selection the code works. Any ideas on how to generalize it for any selected cells?

Thank you

Sub properties()
'Add a border to selected cells
Selection.Borders.Value = 1
End Sub