Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Delete the last Range Name

I import a text file into an excel template, and every import creates a name
for the imported data range. Is there a way to (1) prevent creating a Range
Name on import, (2) delete the Range Name at the end of the import macro, or
(3) delete the last Range Name from the .Names Collection?

I don't want to delete all names because I want to keep some of the
existing range names.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Delete the last Range Name

Is it a CSV file? If so, then just open it in Excel, then copy the data to
your template and close the original file without saving. (with code of
course).

Even if it isn't, you might still be able to use this approach using
OpenText

--
Regards,
Tom Ogilvy

"DennisW" wrote in message
...
I import a text file into an excel template, and every import creates a
name
for the imported data range. Is there a way to (1) prevent creating a
Range
Name on import, (2) delete the Range Name at the end of the import macro,
or
(3) delete the last Range Name from the .Names Collection?

I don't want to delete all names because I want to keep some of the
existing range names.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Delete the last Range Name

The data is not a CSV file, but is a single column of data. Also, this
import is part of a macro which calls several macos to import additional data
and transform/manipulate the date once its in the template. I found that
this code works:
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:\Program Files\...\Estreslt.txt", Destination:=Range("A1"))
.Name = "Estreslt"
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 Delete blanks between a range and populate only the names inthe given range Yuvraj Excel Discussion (Misc queries) 2 November 4th 09 08:32 PM
How to Delete a Range in Closed Workbook (to Replace Delete Query) [email protected] Excel Discussion (Misc queries) 1 March 8th 06 10:10 AM
Range.Delete and Range.Resize.Name performance issues Test.File Excel Programming 0 February 15th 05 03:33 PM
delete name range masterphilch Excel Programming 3 October 11th 04 05:50 PM
Delete range gavmer[_42_] Excel Programming 1 June 30th 04 07:24 AM


All times are GMT +1. The time now is 04:10 AM.

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"