Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default programmatically deselect a selection?

Hello,

If I programmatically select a range of cells -- Range("A1:D5").Select --
how can I deselect the selection without selecting another cell? I vaguely
recall something about range("A1:D5").copypaste = false. But I don't see
that anywhere in the dropdown. Any suggestions appreciated.

Thanks,
Rich

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default programmatically deselect a selection?

Something has to be selected. There is no way around that... You can avoid
moving teh active cell by using range objects. That tends to be a much better
way to go. Then you macro leaves the sheets exactly the way it found them,
without moving the focus.
--
HTH...

Jim Thomlinson


"Rich" wrote:

Hello,

If I programmatically select a range of cells -- Range("A1:D5").Select --
how can I deselect the selection without selecting another cell? I vaguely
recall something about range("A1:D5").copypaste = false. But I don't see
that anywhere in the dropdown. Any suggestions appreciated.

Thanks,
Rich

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default programmatically deselect a selection?

you have to select something else generally. You could select outside the
visible range.

--
Regards,
Tom Ogilvy


"Rich" wrote in message
...
Hello,

If I programmatically select a range of cells -- Range("A1:D5").Select --
how can I deselect the selection without selecting another cell? I

vaguely
recall something about range("A1:D5").copypaste = false. But I don't see
that anywhere in the dropdown. Any suggestions appreciated.

Thanks,
Rich



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 903
Default programmatically deselect a selection?

Hi Rich,
See Chip Pearson's page
http://www.cpearson.com/Excel/unselect.htm
macros for:
Unselecting A Cell Or Area -- unselectactivecell
UnSelecting An Area -- UnSelectActiveArea:

You aren't trying to deselect all selections, are you?

---
HTH,
David McRitchie, Microsoft MVP - Excel

"Rich" wrote in message
...
Hello,

If I programmatically select a range of cells -- Range("A1:D5").Select --
how can I deselect the selection without selecting another cell? I

vaguely
recall something about range("A1:D5").copypaste = false. But I don't see
that anywhere in the dropdown. Any suggestions appreciated.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default programmatically deselect a selection?

Thanks for the reference. Thanks all for your inputs. I know that something
needs to be selected. I discovered sht.Cells.Clear or
sht.Cells.ClearContents without having to select an entire sheet. But now I
can take it to areas with Chip Peason's method.

Thanks

"David McRitchie" wrote:

Hi Rich,
See Chip Pearson's page
http://www.cpearson.com/Excel/unselect.htm
macros for:
Unselecting A Cell Or Area -- unselectactivecell
UnSelecting An Area -- UnSelectActiveArea:

You aren't trying to deselect all selections, are you?

---
HTH,
David McRitchie, Microsoft MVP - Excel

"Rich" wrote in message
...
Hello,

If I programmatically select a range of cells -- Range("A1:D5").Select --
how can I deselect the selection without selecting another cell? I

vaguely
recall something about range("A1:D5").copypaste = false. But I don't see
that anywhere in the dropdown. Any suggestions appreciated.




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
deselect row/column from multiple selection Alan C Excel Discussion (Misc queries) 2 March 5th 09 05:53 PM
select all, deselect these md[_2_] Excel Discussion (Misc queries) 1 March 2nd 08 03:08 PM
Programmatically add shapes to a selection Edward Ulle Excel Programming 3 August 8th 05 12:17 AM
ActiveChart.Deselect won't Deselect Mark Stephens Charts and Charting in Excel 2 June 16th 05 02:54 AM
Programmatically add shapes to a selection Edward Ulle Excel Programming 0 June 1st 05 08:29 PM


All times are GMT +1. The time now is 03:00 PM.

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

About Us

"It's about Microsoft Excel"