View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Excel MVP Don Guillett Excel MVP is offline
external usenet poster
 
Posts: 168
Default Restore a range of cells to "empty"?

On Sep 26, 5:25*am, "Robert Crandal" wrote:
One of my sheets is originally empty, but my user will sometimes
paste a group of data to fill the range of A1:H17. * Or, they might
also run a macro which dumps data from an ADO Recordset
object that fills the range A1:H17.

How do I restore my range (A1:H17) back to its original empty
state after any of the above operations occur? *(How do I do
this using VBA code for Excel 2007?)

Thank you!


Manually: Select the range and touch the delete key
Macro:
sub clearcells()
range("a1:h17").clear
end sub