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

I've made do with using this for now:

ActiveCell.Offset(0, 0).Select

I'd found Selection.Clear, I believe it was, in the archives but when I
tested it, it literally wiped everything in the selection rather than just
removing the selection. In other words, even the conditional formatting was
removed, too. Is there something better than the above code, then, for
this? The above simplistic approach does the job, but it's probably a
ham-handed way of doing this.

Thanks! :oD


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 698
Default Clear selection?

You don't need to select to clear a cell or a range.

ActiveCell.Offset(0, 0).ClearContents

However, if you are setting row/column to 0 then just use

ActiveCell.ClearContents

HTH
Regards,
Howard

"StargateFanFromWork" wrote in message
...
I've made do with using this for now:

ActiveCell.Offset(0, 0).Select

I'd found Selection.Clear, I believe it was, in the archives but when I
tested it, it literally wiped everything in the selection rather than just
removing the selection. In other words, even the conditional formatting
was
removed, too. Is there something better than the above code, then, for
this? The above simplistic approach does the job, but it's probably a
ham-handed way of doing this.

Thanks! :oD




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
How To Clear Previous Selection From a Drop Down The Griffster Excel Discussion (Misc queries) 3 September 22nd 10 09:36 PM
clear the clear the web page email attachment lines MCrider Excel Discussion (Misc queries) 0 November 11th 07 10:05 PM
How do I clear a print area when the selection is grayed out? Ron Excel Discussion (Misc queries) 0 July 24th 07 11:28 PM
Fast way to clear Listbox selection [email protected] Excel Programming 4 August 26th 05 10:09 PM
How to clear a selection Nathan Gutman Excel Programming 4 February 26th 04 03:12 PM


All times are GMT +1. The time now is 10:14 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"