![]() |
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 |
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 |
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 |
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. |
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. |
All times are GMT +1. The time now is 07:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com