erik.van.geit
MrExcel MVP
- Joined
- Feb 1, 2003
- Messages
- 17,832
I'm copying a sheet (with three charts : in case it matters) to a new workbook.
On this sheet are about 5 Named Ranges. When I click at the top left to see names (don't know the word in English) those 5 names are displayed.
But opening the Menu "Insert" (if not correct English, it's the 4th menu), Names, Define: I see all the names (1340) of the "source"workbook adding some unneeded 400kb.
At the end of the procedure, names are removed, taking more than half a minute since Excel doesn't provide a function: "clear all names".
HOW CAN WE PREVENT TO COPY ALL THOSE NAMES ?
thanks for suggestions,
Erik
[/img]
On this sheet are about 5 Named Ranges. When I click at the top left to see names (don't know the word in English) those 5 names are displayed.
But opening the Menu "Insert" (if not correct English, it's the 4th menu), Names, Define: I see all the names (1340) of the "source"workbook adding some unneeded 400kb.
At the end of the procedure, names are removed, taking more than half a minute since Excel doesn't provide a function: "clear all names".
HOW CAN WE PREVENT TO COPY ALL THOSE NAMES ?
thanks for suggestions,
Erik
Code:
Sub compile_graph()
Workbooks(file_name).Activate
Sheets("graph").Copy before:=Workbooks(new_file_name).Worksheets(1)
Sheets("graph").Unprotect "abcd"
Cells.Copy
Cells.PasteSpecial Paste:=xlPasteValues
End Sub
Sub delete_names()
For Each nnn In Workbooks(new_file_name).Names: nnn.Delete: Next
End Sub