Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Empty selection with vba

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Empty selection with vba

Maybe

Range("A1").Activate

Mike

"VBA beginner" wrote:

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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Empty selection 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
"VBA beginner" <VBA wrote in message
...
| 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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selection range to last non empty cell Jaan Excel Programming 4 November 20th 05 07:56 AM
finding empty selection Chimanrao Excel Programming 6 November 11th 05 03:25 AM
Test for an empty selection Edward Ulle Excel Programming 4 September 8th 05 02:54 PM
List Selection to First Empty Row depuyus Excel Programming 2 July 30th 04 09:48 PM
Selection of non-empty cells Adrian[_7_] Excel Programming 6 July 22nd 04 01:06 PM


All times are GMT +1. The time now is 08:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"