Empty selection with vba

  • Thread starter Thread starter VBA beginner
  • Start date Start date
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?
 
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top