View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_1754_] Rick Rothstein \(MVP - VB\)[_1754_] is offline
external usenet poster
 
Posts: 1
Default clear data and named cell

If you are right and iCurrentMergeStart is the name given to a named range,
then I would think (based on how the OP phrased his message) that he would
be looking for this...

Range("iCurrentMergeStart").ClearContents

or, if iCurrentMergeStart is a variable containing the name, then this...

Range(iCurrentMergeStart).ClearContents

rather than a method to physically delete the name from the Names
collection. But then again, you might be right as the question was not very
clearly stated to me.

Rick


"FSt1" wrote in message
...
hi
is iCurrentMergeStart the name? if so then....
ActiveWorkbook.Names("iCurrentMergeStart").Delete

regards
FSt1

"greg" wrote:

I know this code below will clear the text in a row.
But it will not clear out the named cells.
Is there a way to clear both?


Rows(CStr(iCurrentMergeStart & ":" & iCurrentMergeStart)).ClearContents