Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to Delete blanks between a range and populate only the names inthe given range | Excel Discussion (Misc queries) | |||
How to Delete a Range in Closed Workbook (to Replace Delete Query) | Excel Discussion (Misc queries) | |||
Range.Delete and Range.Resize.Name performance issues | Excel Programming | |||
delete name range | Excel Programming | |||
Delete range | Excel Programming |