In simple words, when you specify a text into it, it returns that text by converting its each character into the capital letter.
If a text is already in the upper case, that remains unchanged.
In the below example, we have a lower case text string in cell A1.
To convert this text into a upper case text you can UCASE function like below.
Range("A1").Value = UCase(Range("A1"))
You can also write this code like below to remove space from the active cell.
ActiveCell.Value = UCase(ActiveCell.Value)
And, to convert a text into an upper case from all the cells in a selection then you can use below code.
Dim rng As Range
For Each rng In Selection
rng = UCase(rng)