Empty selection with vba

V

VBA beginner

How can I hide the selected cell? For example, if I have selected one cell
and my VBA code execution ends and I don't want that the last selected cell
is selected anymore. How can I do it with VBA?
 
J

Jim Rech

Something is always 'selected' in a worksheet, so if you don't like the
current selection you have to select something else, as Mike demonstrated.
Btw though, most actions can be performed in VBA without changing the
selection. New coders often write:

Range("A1").Select
ActiveCell.Font.Bold = True

but all that's needed is:

Range("A1").Font.Bold = True

--
Jim
| How can I hide the selected cell? For example, if I have selected one cell
| and my VBA code execution ends and I don't want that the last selected
cell
| is selected anymore. How can I do it with VBA?
 
Top