Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default clear data and named cell

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default clear data and named cell

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default clear data and named cell

hi
you may be right. but from his title "clear data AND Named cell", i assumed
that was what it wanted. he is already clearing the data. and i did ask. is
that the name? question not clearly stated

Regards
FSt1

"Rick Rothstein (MVP - VB)" wrote:

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





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 108
Default clear data and named cell

Hello,
Thanks for the help.

Yes, clear the data and named cell.
I really don't want to delete the row. But clear the data. and also remove
all the named cells.


"FSt1" wrote in message
...
hi
you may be right. but from his title "clear data AND Named cell", i
assumed
that was what it wanted. he is already clearing the data. and i did ask.
is
that the name? question not clearly stated

Regards
FSt1

"Rick Rothstein (MVP - VB)" wrote:

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









  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default clear data and named cell

Remove "all" the named cells on a single worksheet (the one whose row you
cleared) or throughout your entire workbook?

Rick


"greg" wrote in message
...
Hello,
Thanks for the help.

Yes, clear the data and named cell.
I really don't want to delete the row. But clear the data. and also
remove all the named cells.


"FSt1" wrote in message
...
hi
you may be right. but from his title "clear data AND Named cell", i
assumed
that was what it wanted. he is already clearing the data. and i did ask.
is
that the name? question not clearly stated

Regards
FSt1

"Rick Rothstein (MVP - VB)" wrote:

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








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
Transfer a name from one cell to another but leave clear if clear? Scoober Excel Worksheet Functions 3 May 22nd 09 02:55 AM
Clear cell data using Combo Box Scott King[_2_] Excel Programming 1 July 18th 07 09:14 PM
Clear Named Ranges Les Stout[_2_] Excel Programming 3 March 7th 07 06:17 PM
VBA Macro to Clear Named Cell Contents [email protected] Excel Programming 3 January 3rd 06 08:42 PM


All times are GMT +1. The time now is 12:05 PM.

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

About Us

"It's about Microsoft Excel"