Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Is there any way we cna clear everything..

Hi all,

I am writing a code that can clear everything starting from a named
cell to the end of the sheet. The situation like this..

----------
| START_1 | <---Named cell
----------
Table 1 goes here

----------
| START_2 | <---Named cell
----------
Table 2 goes here .. and so on.

I wish to clear everything from START_1 to the end of the sheet. I
need to clear even the named cells. I tried a recorded macro to clear
all. But that doesn't clear the named cells. Any ideas or
suggestions...Thanks in advance for your advice..

Shishi

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Is there any way we cna clear everything..

Dim rng as Range
set rng = Range(range("Start_1").Row & ":65536")EntireRow.Delete
On Error Resume Next
for each nm in ActiveWorkbook.Names
if Instr(1,nm.Refersto,"#Ref",vbTextCompare) then
nm.Delete
end if
Next
On Error goto 0

--
Regards,
Tom Ogilvy

"shishi" wrote in message
oups.com...
Hi all,

I am writing a code that can clear everything starting from a named
cell to the end of the sheet. The situation like this..

----------
| START_1 | <---Named cell
----------
Table 1 goes here

----------
| START_2 | <---Named cell
----------
Table 2 goes here .. and so on.

I wish to clear everything from START_1 to the end of the sheet. I
need to clear even the named cells. I tried a recorded macro to clear
all. But that doesn't clear the named cells. Any ideas or
suggestions...Thanks in advance for your advice..

Shishi



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
Why Doesn't it Clear?? Roger Excel Discussion (Misc queries) 5 January 30th 08 10:07 PM
clear the clear the web page email attachment lines MCrider Excel Discussion (Misc queries) 0 November 11th 07 10:05 PM
Not clear dkuz Excel Discussion (Misc queries) 4 February 14th 06 05:45 PM
Clear all? sdmccabe Excel Discussion (Misc queries) 3 December 16th 05 07:51 PM


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